API controls
Reasoning
Defaults apply when both the effort field and reasoning-related
chat_template_kwargs are omitted.
| Model | Default reasoning | Chat: reasoning_effort | Responses: reasoning.effort |
|---|---|---|---|
| Kimi-K3.1-Pro | max | none (off, River extension), low, high, max | none (River extension), low, high, max |
| Kimi-K3 | max | none (off), low, high, max | none, low, high, max |
| DeepSeek-V4.1-Flash-1017 | Off | none (off), low, high, max | none, low, high, max |
| DeepSeek-V4.1-Flash | Off | none (off), low, high, max | none, low, high, max |
| NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4 | On (high) | none (off), medium, high | none, medium, high |
| GLM-5.3-Flash | max | low, high, max (minimal, medium, xhigh map to them) | low, high, max (minimal, medium, xhigh map to them) |
| GLM-5.3 | max | low, high, max (minimal, medium, xhigh map to them) | low, high, max (minimal, medium, xhigh map to them) |
| Qwen3.8-27B-FP8 | xhigh | none (off), low, medium, xhigh | none, low, medium, xhigh |
For either DeepSeek model, explicitly enabling thinking without an effort
level uses high.
GLM-5.3-Flash and GLM-5.3 require reasoning, so none is rejected. Their
templates know three tiers; the OpenAI names minimal, medium and
xhigh are accepted and run as low, high and max. A Responses reply
echoes the effort as sent. Chat returns reasoning in reasoning_content and
the answer in content (message for JSON, delta for streaming). Both
count toward the output budget and price.
Sampling
| Setting | Chat Completions | Responses |
|---|---|---|
| Output budget | max_completion_tokens (or max_tokens) | max_output_tokens |
| Temperature | temperature: 0–2 | temperature: 0–2 |
| Nucleus sampling | top_p: 0–1 | 0 < top_p <= 1 |
| Streaming | stream: true | stream: true |
| Continue past EOS (River extension) | ignore_eos: true | ignore_eos: true |
Kimi-K3 and Kimi-K3.1-Pro default to a 131,072-token output budget.
GLM-5.3-Flash and GLM-5.3 default to a 65,536-token output budget and to
top_p 0.95, the values Z.ai's own API applies; a Responses reply reports
the top_p used. All output budgets are bounded by the remaining context
after the input.
Structured output
Use response_format: {"type": "json_object"} to return a JSON object.
To enforce specific fields, add this to a Chat Completions request:
{
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "result",
"strict": true,
"schema": {
"type": "object",
"properties": {"ok": {"type": "boolean"}},
"required": ["ok"],
"additionalProperties": false
}
}
}
}For Responses, use text.format with type, name, strict, and schema.
Validate the returned JSON and check for truncation.
Responses API
Inside the quickstart's client block:
response = client.responses.create(
model="deepseek-ai/DeepSeek-V4.1-Flash",
input="What is 2 + 2?",
reasoning={"effort": "high"},
max_output_tokens=1024,
store=False,
)
print(response.output_text)Send full history in input. store: true, background: true,
previous_response_id, and conversation are unsupported.
Successful streams end with response.completed.