POST /v1/chat/completions. Use the model ID qwen3.8-max for text generation, image and video understanding, function calling, and structured output.
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.
- Multimodal input — Accept text, images, and video.
- Text output — Return text responses.
- Thinking mode — Enabled by default and can be disabled.
Quick example
cURL
Python
Image and video input
Send image content as animage_url part. Image and video content parts were both successfully called through AnyFast for qwen3.8-max. Use a public HTTPS URL or a supported data URI; see the visual understanding guide for upstream media limits.
Python
image_url part with {"type": "video_url", "video_url": {"url": "https://example.com/sample.mp4"}}. The video URL must point to an accessible file.
Thinking and structured output
Thinking is enabled by default. Setenable_thinking to false to omit the reasoning step. In the OpenAI SDK, pass this provider-specific field through extra_body. A non-thinking json_object request succeeded through AnyFast for qwen3.8-max.
Python
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. Use tool_choice: "required" to require a tool call.
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.8-Max.