Docs / API reference
Chat Completions
The primary endpoint. Fields mirror OpenAI's; anything not listed here is passed through to upstream unchanged.
POST /v1/chat/completions
Parameter
Description
model
Unified slug, e.g. deepseek-v4, claude-sonnet-4.5.
messages
Four roles — system / user / assistant / tool — same as the official API.
stream
Boolean; when true, deltas are pushed over SSE.
tools
Array of tool definitions; parallel tool calls are supported.
response_format
Set to json_object or json_schema to force structured output.
max_tokens
Maximum output per request; defaults to the model's limit.
Response shape
JSON
{
"id": "chatcmpl-9f2a",
"model": "deepseek-v4",
"choices": [{ "index": 0, "message": { "role": "assistant", "content": "..." }, "finish_reason": "stop" }],
"usage": { "prompt_tokens": 8000, "completion_tokens": 1200, "total_tokens": 9200 }
}The X-Oneapi-Request-Id response header matches the request id in the usage logs — include it whenever you contact us to debug an issue.