Skip to content

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:

DimensionFull NameMeaning
RPMRequests Per MinuteMaximum requests per minute
RPHRequests Per HourMaximum requests per hour
RPDRequests Per DayMaximum requests per day
TPMTokens Per MinuteTotal tokens consumed per minute (input + output)
TPDTokens Per DayMaximum tokens per day
IPMImages Per MinuteMaximum images generated per minute
IPDImages Per DayMaximum 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 later

Rate 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.