DeepSeek Commands & Prompt Reference
22 commands & parameters · 2 categories · Source: DeepSeek API Docs
DeepSeek's chat models are driven through a compact, OpenAI-compatible API surface: a handful of JSON body fields control sampling, streaming, tool use, and output format, and a pair of model IDs switch between the general chat model and the reasoning model that returns its chain of thought in reasoning_content. This page lists the chat completion parameters and the model and beta-feature tokens from the official API documentation.
The beta base URL unlocks two prompt-level features worth knowing: chat prefix completion forces the reply to continue from a prefix you supply, and fill-in-the-middle completion takes a prompt plus a suffix and generates what belongs between them. JSON mode is switched on through response_format, but the docs are explicit that the prompt itself must also ask for JSON.
All Commands
Chat API Parameters (16)
| Command / Syntax | What it does | Notes |
|---|---|---|
| model | The model used for the chat completion | This fingerprint represents the backend configuration that the model runs with. |
| messages | A list of messages comprising the conversation so far | JSON body field of POST /chat/completions. |
| temperature | What sampling temperature to use, between 0 and 2 | Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. |
| top_p | An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the... | So 0.1 means only the tokens comprising the top 10% probability mass are consid |
| max_tokens | The maximum number of tokens that can be generated in the chat completion | The total length of input tokens and generated tokens is limited by the model's context length. |
| frequency_penalty | This parameter is no longer supported | It will not take effect if you pass it to the API. |
| presence_penalty | This parameter is no longer supported | It will not take effect if you pass it to the API. |
| stop | Up to 16 sequences where the API will stop generating further tokens | JSON body field of POST /chat/completions. |
| stream | If set, partial message deltas will be sent | Tokens will be sent as data-only server-sent events (SSE) as they become available, with the stream terminated by a |
| stream_options | Options for streaming response | Only set this when you set If set, an additional chunk will be streamed before the field on this chunk shows the token usage statistics for the... |
| response_format | An object specifying the format that the model must output | Setting to { "type": "json_object" } enables JSON Output, which guarantees the message the model generates is valid JSON. |
| tools | A list of tools the model may call | Currently, only functions are supported as a tool. |
| tool_choice | Controls which (if any) tool is called by the model | means the model will not call any tool and instead generates a message. |
| logprobs | Whether to return log probabilities of the output tokens or not | If true, returns the log probabilities of each output token returned in the |
| top_logprobs | An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with... | JSON body field of POST /chat/completions. |
| thinking | Controls the switch between thinking and non-thinking mode | JSON body field of POST /chat/completions. |
Models & Beta Feature Tokens (6)
| Command / Syntax | What it does | Notes |
|---|---|---|
| deepseek-chat | Model ID for the general chat model | Set as the model field value. |
| deepseek-reasoner | Model ID for the reasoning model; responses include reasoning_content | Set as the model field value. Chain-of-thought is returned in reasoning_content. |
| https://api.deepseek.com/beta | Base URL that enables beta features | Required for chat prefix completion and FIM completion. |
| prefix | Chat prefix completion: force the assistant reply to continue from a given prefix (beta) | Set prefix: true on the last assistant message, with the beta base URL. |
| suffix | FIM completion: text after the insertion point (beta) | Fill-in-the-middle on POST /beta/completions, together with prompt. |
| {"type": "json_object"} | response_format value that switches on JSON mode | Also instruct the model to produce JSON in the prompt, or output may be empty. |
Frequently Asked Questions
What is the difference between deepseek-chat and deepseek-reasoner?
deepseek-chat is the general conversation model. deepseek-reasoner performs explicit reasoning first and returns it in a separate reasoning_content field alongside the final answer.
How do I enable JSON mode?
Set response_format to {"type": "json_object"} and also instruct the model in the prompt to produce JSON - the documentation warns output may be empty otherwise.
What does the beta base URL enable?
https://api.deepseek.com/beta unlocks chat prefix completion (prefix: true on the last assistant message) and FIM completion (prompt plus suffix on the completions endpoint).
Every entry on this page is a literal, typeable token taken from the official documentation linked above. Command sets in AI tools change quickly - the in-product command menu is always authoritative for your installed version.