API overview¶
One public API serves every client: the bundled components, your own UI and your scripts. The endpoint reference is generated from the API's own contract, so it always matches the release you read.
- Base path:
/api/v1. - Auth:
Authorization: Bearer <the user's token>, verified by your identity endpoint. Requests only ever reach the caller's own tenant. - Runs are submit-and-poll.
POST /threads/{id}/messagesanswers202with arun_idandpoll_after_ms; pollGET /runs/{id}untilstatusis no longerqueuedorrunning. It ends ascompleted,failed,cancelled,expiredorstopped_by_limit, or pauses atrequires_action(see Tools). - Machine-readable: the OpenAPI file is published with each release, and the sandbox serves interactive docs at
/api/v1/docs.
Errors¶
Every error has the same shape:
{"error": {"code": "not_found", "message": "No such chat.", "request_id": "req_..."}}
Quote request_id when you contact support. Common codes: 401 token refused, 403 not allowed (including an expired license), 404 not found or not yours, 409 already answered or still running, 422 invalid body, 429 limit_reached (a token cap), 503 the identity endpoint or the agent is unreachable.
Pagination¶
List endpoints take limit and cursor; a response with a next_cursor has more.
Example¶
curl https://assistant.example.com/api/v1/me -H "Authorization: Bearer $TOKEN"