chatCompletions

Create a chat completion

Generates a model response for a conversation. Supports streaming (stream: true, server-sent events) and non-streaming responses. When streaming, each frame is a data: line holding one JSON completion chunk, the chunk carrying usage has an empty choices array, and the stream ends with the literal data: [DONE]. OpenAI-compatible: the supported fields are documented here, and the wider OpenAI SDK parameter set is accepted so that existing OpenAI code runs unmodified.

post/chat/completions

Headers

Authorizationstring required

Bearer authentication

x-session-idstring

Groups related requests into one session. Required when using planner_mode, which uses it to resume a paused plan.

Request body

modelstring required

The ASI:One model to use.

streamboolean

If true, partial deltas are streamed as server-sent events.

temperaturenumber double

Sampling temperature.

max_tokensinteger

Maximum number of tokens to generate.

top_pnumber double

Nucleus sampling probability mass.

stopstring[]

Up to four strings that end generation when produced.

parallel_tool_callsboolean

Whether the model may call several tools in one turn.

enable_thinkingboolean

ASI:One extension. Whether the model reasons before answering. See the Reasoning guide.

thinking_budgetinteger

ASI:One extension. Maximum tokens the model may spend reasoning. Applies on asi1.

planner_modeboolean

ASI:One extension. Routes the request to the planner, which breaks it into steps and runs them against tools and Agentverse agents. Available on asi1, asi1-ultra and asi1-mini. See the Planner Mode guide.

agentsstring[]

ASI:One extension. Agentverse agent addresses the planner may use without discovering them first. Used with planner_mode.

Response

A chat completion object, or an SSE stream of completion chunks when stream is true.

idstring required
objectstring required
createdinteger

Unix timestamp (seconds) of creation.

modelstring

The model that produced the response.

Changes