v1
latestOpenAPI 3.1.02026-07-26102453.5 KBCreate chat completion
Generate conversational responses using a structured message format with roles (system, user, assistant, developer, tool). Best for chatbots, assistants, and multi-turn conversations.
post/v1/chat/completions
Headers
Content-Type'application/json' | 'application/vnd.msgpack'
The media type of the request body. Supported values: application/json, application/vnd.msgpack. Default: application/json.
Content-Encoding'gzip'
The compression encoding applied to the request body. When set, the request body must be gzip-compressed. Can be combined with any supported Content-Type. Supported values: gzip.
queue_thresholdstring
Controls the queue time threshold for requests using the flex or auto service tiers. Requests are preemptively rejected if the rolling average queue time exceeds this threshold. Valid range: 50–20000 (milliseconds). Private Preview.
Request body
Response
Successful response