Qwen/Qwen3-32BQwen/Qwen3.6-27BQwen/Qwen3.5-397B-A17Bkimi-k2.6
reasoning field.
For the full model list and pricing, refer to Models.
Core Capabilities
- Structured thinking: Break complex problems into smaller and clearer steps through chain-of-thought (CoT).
- Knowledge fusion: Combine general knowledge with domain-specific context to improve coverage and accuracy.
- Self-correction: Add validation and reflection during generation to improve result reliability.
- Multimodal processing: Some models support mixed inputs, such as text, code, and formulas. For details, refer to the corresponding model details.
Usage Notes
- Before moving to production, check each model’s context limits, whether it supports
thinking_budget, pricing, and concurrency limits. - Not every model emits a
reasoningfield. General-purpose chat models, such asDeepSeek-V4-Flash, answer directly without exposing a separate chain-of-thought.
Key Parameters
Parameter Description
-
Request parameters
thinking_budget: Token budget for internal reasoning. It can be used to balance reasoning depth and response latency.max_completion_tokens: Token limit for user-visible output, used to avoid overly long responses.
-
Context
context_lengthis not a request parameter. The maximum context length supported by each model can be viewed in Models. -
Response fields
reasoning: Chain-of-thought content, at the same level ascontentin the response object.content: The final answer content shown to end users.
Recommendations
thinking_budgetis a hint, not a hard limit. Some models use it to adjust the amount of reasoning, while others may only partially apply it or even ignore it. Do not treat it as an exact limit.- The reasoning process and final answer share the
max_completion_tokensbudget. Ifmax_completion_tokensis set too low, reasoning content may consume the budget, causingcontentto be empty withfinish_reason: length. We recommend increasingmax_completion_tokensappropriately or controlling reasoning length throughthinking_budgetto leave enough room for the final answer. - If the output exceeds
max_completion_tokens, or the total input exceedscontext_length, the response will be truncated andfinish_reasonwill be set tolength.
Notes
- Streaming vs. non-streaming: Use streaming when you need long output or real-time feedback; use non-streaming when you need to receive the complete result at once.
- Latency and stability: Tune
thinking_budget,max_completion_tokens, and client timeout settings to reduce the risk of 504 errors and request timeouts. - Quota and concurrency: Configure rate limiting strategies with pricing in mind, based on Models. Implement exponential backoff on the client side when necessary.
Billing
- Formula: Total cost = (input tokens x input unit price) + (output tokens x output unit price).
- Pricing: Check the model detail page in Models for each model’s pricing.
Examples
The examples read the API key from an environment variable to avoid writing secrets into code.Streaming Request
Non-Streaming Request
FAQ
- How should I handle very long text?
Adjust
max_completion_tokensand enablestream=Trueto reduce timeout risk. Context limits vary by model; refer to Models for details. - What if the chain-of-thought is too long and gets truncated?
Lower
thinking_budgetor increase the client timeout, and make suremax_completion_tokensis set to a reasonable value. - Why can’t I see
reasoning? Only some reasoning models return this field. Refer to each model’s documentation.

