Create async chat completion

POST/v1/async/chat/completions

Queue a single non-streaming chat completion. Returns a job (chatjob_…) immediately. Poll Retrieve async chat job.

See Async Chat for the full workflow. Body fields match Create chat completion except stream must be false.

callback_url is not accepted. Poll Retrieve async chat job. For HTTPS callbacks on many lines, use Create batch callback_url — see Webhook.

Authentication

Authorization Bearer

Request Body

modelstringrequired

Public model name (same as sync chat).

messagesarrayrequired

OpenAI-style chat messages.

messages.rolestringrequired

Message role, such as system, user, assistant, or tool.

messages.contentstring | object[]required

Message content. Multimodal models may accept structured content parts.

messages.namestring

Optional participant name.

messages.tool_call_idstring

Tool call ID for tool messages.

max_tokensinteger

Optional generation cap.

streamboolean

Must be false or omitted. true → 400 invalid_request.

Response

idstring

Job ID (chatjob_ prefix).

objectstring

chat.completion.job

statusstring

queued, then in_progress / completed / failed / cancelled / expired.

modelstring

Public model name.

request_idstring

Use with GET /v1/billing/{request_id}.

qosstring

Typically completion.

created_atinteger

Unix timestamp.

expires_atinteger

Estimated expiry. Display estimate; not a hard kill for in-flight work.

Solicitar

Shell
1curl -X POST https://api.token360.ai/v1/async/chat/completions \
2  -H "Authorization: Bearer sk-your-api-key" \
3  -H "Content-Type: application/json" \
4  -d '{
5    "model": "claude-opus-5",
6    "messages": [{"role": "user", "content": "Say hi in one word."}],
7    "max_tokens": 16,
8    "stream": false
9  }'

Respuesta

JSON
1{
2  "id": "chatjob_01abc",
3  "object": "chat.completion.job",
4  "status": "queued",
5  "model": "claude-opus-5",
6  "request_id": "async-14b8c9ca-c6f3-469c-b91e-15a280abbc83",
7  "created_at": 1710000000
8}
¿Ha sido de ayuda?