Skip to main content
This guide walks through a single request: send a prompt and read the response.

1. Get a token

You authenticate with a bearer token tied to your account. See Authentication for how to obtain and send it. In the examples below, set it as an environment variable:
export HUMALIKE_TOKEN="your-token"

2. Send a prompt

POST /v1/ask with a JSON body containing a non-empty prompt.
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."}'

3. Read the response

A successful call returns 200 with the generated text and a unique id for the exchange:
{
  "id": "f7c1a9e2-1b6e-4a3a-9f5d-2c8e0b4d6a11",
  "response": "Salt wind on the waves / ..."
}
That’s it — one authenticated POST is the whole flow. Next, review the full request and response schema.