Skip to main content
POST https://api.humalike.com/v1/ask
Submit a prompt and receive a single generated response. Each call is recorded and returned with a unique identifier.

Authorization

Authorization
string
required
Your bearer token: Bearer <token>. See Authentication.

Request body

prompt
string
required
The prompt to send. Must be a non-empty string.
Request
{
  "prompt": "Write a haiku about the sea."
}

Response

id
string
A unique identifier (UUID) for this request/response exchange.
response
string
The generated response text.
200 OK
{
  "id": "f7c1a9e2-1b6e-4a3a-9f5d-2c8e0b4d6a11",
  "response": "Salt wind on the waves / gulls trace the grey horizon / tide forgets the shore"
}

Errors

StatusCodeWhen
400VALIDATION_ERRORThe body is missing prompt or it is empty.
401UNAUTHORIZEDThe bearer token is missing, invalid, or expired.
502UPSTREAM_ERRORThe generation provider could not be reached.
503DATABASE_ERRORThe request could not be persisted; retry.
See Errors for the full envelope shape.

Example

curl https://api.humalike.com/v1/ask \
  -H "Authorization: Bearer $HUMALIKE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "Write a haiku about the sea."}'