Request body.
Optionalattribution?: Record<string, unknown>Optional caller tags recorded on the LLM-call accounting row. Allowed keys: task_id (max 64 chars), work_id (max 64), agent_kind (one of worker, one_off, subagent, overseer, task_reviewer, interactive, daemon_job), agent_id (max 64), client (max 32). Anything else is a 400.
Optionalcontext?: Record<string, unknown>Key-value map used to resolve template variables in message content. Omit if messages contain no templates.
Ordered list of conversation messages to send to the model.
Model and sampling configuration for this request.
Optionalsession_id?: stringOptional UUID grouping this and other completions under one session in the Developers dashboard. Pass the same value across requests to link them; omit to auto-generate a per-request session.
The completed AI response, including the generated message, finish reason, and token usage.
Create a chat completion Sends a list of messages to the configured AI provider and returns a single completion. Use this endpoint when you want direct, low-level access to the underlying model without any workflow or agent orchestration. The authenticated app must have the
llm_callsentitlement enabled on its plan. Requests that exceed the plan quota are rejected with402. Token usage is recorded against the authenticated app and organization. Supplytoolsandtool_choiceto enable OpenAI-compatible function calling. Useserver_toolsto activate platform-managed tools such as search that run on the server side before the response is returned.