ModelSite
Concepts

Rate limits & quota

Rate limits, quota, and handling 429

The platform limits on two layers: rate (RPM/TPM) and balance quota, computed per API key / organization / tier.

Rate limits

DimensionMeaning
RPMrequests per minute
TPMtokens per minute
Concurrencyin-flight requests

Allowances depend on your tier and model; higher tiers get more. Response headers carry current usage and limits:

HeaderMeaning
x-ratelimit-limit-requestsRPM cap
x-ratelimit-limit-tokensTPM cap
x-ratelimit-remaining-requestsrequests left this minute
x-ratelimit-remaining-tokenstokens left this minute
retry-aftersuggested wait (seconds) on 429

Quota (balance)

Every successful call is billed in real time per Billing. Insufficient balance returns 402 insufficient_quota — top up or upgrade.

Handling 429

# read retry-after / exponential backoff
import time
for i in range(5):
    r = call()
    if r.status_code != 429:
        break
    time.sleep(int(r.headers.get("retry-after", 2 ** i)))

Recommendation: do concurrency control (token bucket / semaphore) + exponential backoff on the client to avoid maxing out RPM.

On this page