Send single non-real-time chat requests at a lower price through an OpenAI-compatible endpoint
Batch Chat is a lower-cost way to run non-real-time workloads such as data annotation and content generation. It uses the same OpenAI-compatible request format as real-time chat, so you only change the base URL. Each request is submitted individually, queued, and returned over the same connection when processing finishes.
Supported regions: China North 2 (Beijing). Batch Chat uses the batch host
Some models enable thinking mode by default. Thinking tokens are billed at the output token price. Set
Change the base URL from the real-time endpoint to the Batch Chat endpoint. The request body is the same as OpenAI-compatible chat.
The call rate is a theoretical maximum. Actual capacity depends on system load, so implement retries.
See Batch File for file-based batch.
Is Batch Chat slower than the real-time API?
Yes. Requests are queued, so end-to-end time is usually longer. The maximum wait is one hour; if it is exceeded, the connection closes with a timeout error.
Does Batch Chat guarantee that every request completes?
No. Completion depends on available capacity. Requests may wait in the queue, and a request that cannot run within the maximum wait time times out. Timed-out requests are not billed; retry them later.
Can I set a shorter timeout?
Yes. Set a client-side timeout between 60 and 3,600 seconds.
If a call fails and returns an error message, see Error codes.
https://batch.dashscope.aliyuncs.com and an API key created in that region. See Regions and endpoints.
How it works
- Submit a request: the client sends a request and keeps the connection open.
- Queue and wait: the request waits in a queue while the connection stays open.
- Return the result: the server returns the complete response over the open connection. If the maximum wait time is exceeded, the connection closes with a timeout error.
Supported models
| Category | Models |
|---|---|
| Text generation | qwen3.8-max, qwen3.8-flash, qwen3.7-max, qwen3.7-plus, qwen3.7-flash, qwen3.6-plus, qwen3.6-flash, qwen3.5-plus, qwen3.5-flash, qwen-max, qwen-plus, qwen-flash |
| Vision | qwen3-vl-plus |
| Omni-modal | qwen3.5-omni-plus, qwen3.5-omni-flash |
enable_thinking explicitly to control cost.
Make a call
Change the base URL from the real-time endpoint to the Batch Chat endpoint. The request body is the same as OpenAI-compatible chat.
- Python
- Node.js
- curl
Limits
| Item | Limit |
|---|---|
| Maximum synchronous wait | 3,600 seconds (1 hour) |
| Custom timeout | 60 to 3,600 seconds |
| Pending requests | 10,000 per model per account. New requests are rejected while the limit is reached. |
| Call rate | 1,000 QPS per account, or 10,000 calls per 10 seconds |
Billing
- Only successful requests are billed, based on input and output tokens.
- The list price matches the real-time API. A limited-time 50% discount is available.
- Timed-out and failed requests are not billed.
- Batch Chat does not support context caching.
Choose between Batch Chat and Batch
| Batch Chat | Batch (file input) | |
|---|---|---|
| Input | One request per call | One JSONL file with up to 50,000 requests |
| Result | Returned over the same connection | Retrieved asynchronously after the job completes |
| Use this when | Many independent requests, high concurrency | One large file, results collected later |