Request payload for chat completion.
| Property | Type | Description |
|---|---|---|
| logprobs | Boolean |
Whether to return log probabilities of the output tokens or not. |
| max_tokens | Integer |
The maximum number of tokens that can be generated in the chat completion. |
| messages |
A list of messages comprising the conversation so far. |
|
| model | String |
ID of the model to use (e.g., deepseek-flash, deepseek-v4-pro). |
| response_format | Completion_Response_Format |
An object specifying the format that the model must output. |
| stop |
Up to 16 sequences where the API will stop generating further tokens. |
|
| stream | Boolean |
If set, partial message deltas will be sent as server-sent events. |
| stream_options | Completion_Stream_Options |
Options for streaming responses. |
| temperature | Number |
Sampling temperature between 0 and 2. |
| thinking | Completion_Thinking |
Controls the switch between thinking and non-thinking mode. |
| tool_choice | Any |
Controls which (if any) tool is called by the model. Either the string none, auto or required, or a Completion_Tool_Choice object. |
| tools |
A list of tools the model may call. |
|
| top_logprobs | Integer |
An integer between 0 and 20 specifying the number of most likely tokens to return at each token position. |
| top_p | Number |
Nucleus sampling probability mass (between 0 and 1). |
| user_id | String |
A custom end-user identifier ([a-zA-Z0-9-_], max 512 chars), used for content safety review, KVCache isolation and scheduling isolation. |