Rate Limits
To ensure efficient use of resources, the platform enforces rate limits to guarantee service availability and stability.
What Are Rate Limits
Rate limits restrict how many requests a user can make, or how many tokens they can consume, within a given time window. Common dimensions include:
| Dimension | Full Name | Meaning |
|---|---|---|
| RPM | Requests Per Minute | Maximum requests per minute |
| RPH | Requests Per Hour | Maximum requests per hour |
| RPD | Requests Per Day | Maximum requests per day |
| TPM | Tokens Per Minute | Total tokens consumed per minute (input + output) |
| TPD | Tokens Per Day | Maximum tokens per day |
| IPM | Images Per Minute | Maximum images generated per minute |
| IPD | Images Per Day | Maximum images generated per day |
Why Rate Limits Are Needed
- Prevent malicious abuse — for example, bursts of invalid requests degrading performance or even taking the service down
- Ensure fair resource allocation so that a small number of high-frequency users don't crowd out everyone else
- Deliver a consistent, efficient service experience for all users
Specific Rate Limit Parameters
The platform applies a unified rate policy per account based on the model, endpoint category, and account tier. For example, with a quota of 120 RPM, the account can send at most 120 requests per minute; if 30 have been used, 90 remain for other requests.
See User Levels for the default limits of each tier.
Response When Exceeding the Limit
When request volume or token usage hits the limit within a short window, the API returns a 429 error and temporarily rejects further requests until the cooldown period ends:
HTTP/1.1 429 Too Many Requests
Content-Type: application/json
Upstream load for the current group is saturated; please try again laterRate Limits and max_tokens
Since the exact input and output token counts cannot be known when a request is made, the system estimates token usage from the max_tokens parameter and applies TPM throttling based on that estimate. Once generation completes, the actual token count is used for correction.
TIP
Set max_tokens as close to your actual needs as possible to minimize throttling errors caused by over-estimation.
Optimization Tips Under Rate Limits
Request count and token volume are throttled independently. When you have hit the request cap but still have token headroom, batch multiple tasks into a single request to improve token efficiency. We also recommend implementing exponential backoff retries in your client to ride out 429 responses smoothly.
How to Increase Your Rate Limits
Default limits exist to keep the API stable and fairly shared. Any top-up automatically upgrades your account to a higher tier (see User Levels). For even higher rates or dedicated capacity, please contact us.