Skip to content
Inference

API controls

Reasoning

Defaults apply when both the effort field and reasoning-related chat_template_kwargs are omitted.

ModelDefault reasoningChat: reasoning_effortResponses: reasoning.effort
Kimi-K3.1-Promaxnone (off, River extension), low, high, maxnone (River extension), low, high, max
Kimi-K3maxnone (off), low, high, maxnone, low, high, max
DeepSeek-V4.1-Flash-1017Offnone (off), low, high, maxnone, low, high, max
DeepSeek-V4.1-FlashOffnone (off), low, high, maxnone, low, high, max
NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4On (high)none (off), medium, highnone, medium, high
GLM-5.3-Flashmaxlow, high, max (minimal, medium, xhigh map to them)low, high, max (minimal, medium, xhigh map to them)
GLM-5.3maxlow, high, max (minimal, medium, xhigh map to them)low, high, max (minimal, medium, xhigh map to them)
Qwen3.8-27B-FP8xhighnone (off), low, medium, xhighnone, 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

SettingChat CompletionsResponses
Output budgetmax_completion_tokens (or max_tokens)max_output_tokens
Temperaturetemperature: 0–2temperature: 0–2
Nucleus samplingtop_p: 0–10 < top_p <= 1
Streamingstream: truestream: true
Continue past EOS (River extension)ignore_eos: trueignore_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.