Docs

Start here

Start a thread

POST/v1/chat/conversationson https://api.auray.ai/v1

Optional — POST /chat mints one when no conversation_id is given.

Optional — POST /chat mints one when no conversation_id is given. With Idempotency-Key (or idempotency_key in the body, which wins when both are sent) the create is one thread however often it is sent: the first send answers 201, every resend answers 200 with replayed: true and the thread the first send made — its model and title, whatever the resend named.

#Authentication

Authorization: Bearer auray_sk_… — text:write, or the older chat:write.

#Request

#Headers

NameTypeRequiredDescription
Idempotency-KeystringnoYour own name for this thread. A resend with the same key answers the thread the first send made rather than a second one.

#Body

application/json.

FieldTypeRequiredDefaultDescription
modelstringno"glm-5-3-flash"The first three are the slots, and the default is the first of them. qwen and kimi are the names two of these slots carried until 2026-09-14; they are still accepted and map to glm-5-3-flash and deepseek-v4-1-flash, and will be withdrawn once integrations have moved. One of "glm-5-3-flash", "deepseek-v4-1-flash", "kimi-k3", "qwen", "kimi".
titlestringno—Truncated to 200 characters rather than refused, and the shortened string is what comes back. maxLength is deliberately not declared: a validator built from it would reject a title this API accepts.
idempotency_keystringno—The same as the Idempotency-Key header, and wins when both are sent. Either one outside the pattern is folded into a key inside it (its SHA-256) rather than refused, because this route read neither until it began keeping one thread per key: the same key is still the same thread.

#Example request

curl -X POST https://api.auray.ai/v1/chat/conversations \
  -H "Authorization: Bearer $AURAY_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'

#Responses

#200 OK

The thread an earlier send with the same idempotency key made.

FieldTypeRequiredDefaultDescription
idstringno—
objectstringno—One of "conversation".
modelstringno—
titlestringno—
created_atstringno—
replayedbooleanno—true when an idempotency key named a thread an earlier send made, which is answered 200 rather than 201.

Headers:

HeaderDescription
RateLimit-LimitBurst capacity.
RateLimit-Remaining
RateLimit-ResetSeconds until refill.
X-RateLimit-Limit
X-RateLimit-Remaining
X-RateLimit-ResetUnix seconds. The X- spelling is what client libraries read.
X-Request-Id

#201 Created

Created.

FieldTypeRequiredDefaultDescription
idstringno—
objectstringno—One of "conversation".
modelstringno—
titlestringno—
created_atstringno—
replayedbooleanno—true when an idempotency key named a thread an earlier send made, which is answered 200 rather than 201.

Headers:

HeaderDescription
RateLimit-LimitBurst capacity.
RateLimit-Remaining
RateLimit-ResetSeconds until refill.
X-RateLimit-Limit
X-RateLimit-Remaining
X-RateLimit-ResetUnix seconds. The X- spelling is what client libraries read.
X-Request-Id

#400 Bad Request

#401 Unauthorized

#403 Forbidden

#413 Payload Too Large

#429 Too Many Requests

#500 Internal Server Error

#503 Service Unavailable

#Status codes

StatusMeaning
200The thread an earlier send with the same idempotency key made.
201Created.
400Bad Request
401Unauthorized
403Forbidden
413Payload Too Large
429Too Many Requests
500Internal Server Error
503Service Unavailable

Every refusal names its code, and every code is explained at Errors.

Start typing to search every page of the documentation.

Up arrow Down arrow to moveEnter to openEscape to close