POST /v1/chat/completions. Use the model ID qwen3.7-max-preview for text generation, reasoning, and function calling in thinking mode.
Key capabilities
- 1M-token context window — The upstream specification allows 1,000,000 tokens.
- 131,072-token maximum output — Upstream limit; available output also depends on context.
- Text-only input — Accept text messages.
- Text output — Return text responses.
- Thinking mode — Required; this preview has no non-thinking mode.
Quick example
cURL
Python
Input modality
This model accepts text input and returns text. Do not sendimage_url or video_url parts to this model.
Thinking and structured output
The preview supports thinking mode only. Keepenable_thinking enabled or omit it. An AnyFast request with enable_thinking: false returned HTTP 400 with invalid_parameter_error.
Function calling
Define functions intools. When the model returns finish_reason: "tool_calls" and message.tool_calls, execute the function in your application and continue the conversation. This request shape succeeded through AnyFast. In the preview thinking mode, use tool_choice: "auto" or none; required returned HTTP 400.
Python
Streaming
Setstream=True to receive SSE chunks. The verified final usage-only chunk has usage and an empty choices array.
Python
Parameters
API Reference
Request and response fields for Qwen3.7-Max-Preview.