Docs

Start here

Read a thread back

GET/v1/chat/conversations/{id}/messageson https://api.auray.ai/v1

What a thread of yours says, in order.

What a thread of yours says, in order. Another account's thread answers 404 conversation_not_found, the answer a thread that never existed gets. Rewound messages are not the thread's any more and are left out, as the model is never sent them. Messages older than the retention window have been scrubbed and are left out like rewound ones, so a scrubbed thread reads back empty; a turn that continues one answers history_scrubbed: true. No message prints a charge: an answer carries its job_id, and GET /jobs/{id} answers what the turn cost from the ledger. It needs chat:read; neither text:write nor the older chat:write reads a thread back.

#Authentication

Authorization: Bearer auray_sk_… — chat:read — not jobs:read, and not text:write or the older chat:write, which submit turns and start threads but do not read one back.

#Request

#Path parameters

NameTypeRequiredDescription
idstringyes

#Query parameters

NameTypeRequiredDescription
limitintegernoClamped to 200. Anything but a whole number of at least 1 is 400 invalid_limit. 1 to 200.
afterintegernoCursor. Feed back the next_after from the previous page; the next page starts strictly after that seq. 0 to ….
include_reasoningstringnoThe model's reasoning beside each answer. It often runs several times the length of the answer. One of "true".

#Example request

curl https://api.auray.ai/v1/chat/conversations/photo_docs-mtpb1vnh/messages \
  -H "Authorization: Bearer $AURAY_API_KEY"

#Responses

#200 OK

OK

FieldTypeRequiredDefaultDescription
objectstringno—One of "list".
conversation_idstringno—
dataobject[]no—
data[].idstringno—
data[].objectstringno—One of "chat.message".
data[].seqintegerno—The message's place in the thread; after pages by it.
data[].rolestringno—One of "user", "assistant".
data[].statusstringno—complete for a message the thread holds; pending or streaming while an answer is being written; stopped for an answer stopped before it finished, failed for one that broke or never began (error_code says why). A stopped or failed answer keeps what was delivered before it ended — charged as delivered — and the next turn is sent it, marked as cut off, with its end kept so the model can continue it. One of "pending", "streaming", "complete", "stopped", "failed".
data[].contentstringno—
data[].reasoningstringno—Only with include_reasoning=true. May be null.
data[].modelstringno—The slot that wrote an answer; null on your own messages. May be null.
data[].finish_reasonstringno—May be null.
data[].error_codestringno—Why an answer failed, in the error catalogue's words. May be null.
data[].job_idstringno—The turn's job, which GET /jobs/{id} reads — what it cost from the ledger included. Null on your own messages. May be null.
data[].created_atstringno—
data[].finished_atstringno—May be null.
has_morebooleanno—
next_afterintegerno—Present exactly when there is another page: the seq of the last message on this one. May be null.

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

#404 Not Found

#429 Too Many Requests

#500 Internal Server Error

#503 Service Unavailable

#Status codes

StatusMeaning
200OK
400Bad Request
401Unauthorized
403Forbidden
404Not Found
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