Qwen/Qwen3-32BQwen/Qwen3.6-27BQwen/Qwen3.5-397B-A17Bkimi-k2.6
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: Total generation budget, including reasoning tokens and visible output tokens. Use it to control the maximum amount generated by the request.
-
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. Increasemax_completion_tokensappropriately or control 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: Cost = input tokens x input unit price + output tokens x output unit price Output tokens include reasoning tokens and visible output tokens. Even if reasoning tokens are not returned as visible content, they are included in platform usage statistics and billed at the model’s output unit price. If the request hits or writes Prompt Caching, cache read tokens and cache write tokens are billed at the corresponding cache unit prices.
- Pricing: Input and output unit prices may vary by model. Check the model detail page in Models for details.
-
Note: For the relationship between reasoning tokens, output tokens, and
max_completion_tokens, see Token Usage and Billing.
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?
How should I handle very long text?
Adjust
max_completion_tokens and enable stream=True to 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?
What if the chain-of-thought is too long and gets truncated?
Lower
thinking_budget or increase the client timeout, and make sure max_completion_tokens is set to a reasonable value.Why is the visible answer short but token usage high?
Why is the visible answer short but token usage high?
Reasoning models consume reasoning tokens before generating the final answer. Reasoning tokens may not be returned as visible content, but they are included in output tokens and billed at the output unit price. For details, see Token Usage and Billing.
Why can't I see reasoning?
Why can't I see reasoning?
Only some reasoning models return this field. Refer to each model’s documentation.

