Docs menu

Docs / Reference

Rate limits

600 requests per minute per key, reported in x-ratelimit headers.

Last updated


The limit

Each API key can make 600 requests per minute, measured over a sliding window. The Playground has its own limit of 600 RPM per account, separate from key limits. Budget packs have the same limit as pay-as-you-go. If you need more, contact support; a key's limit can be raised up to 2,000 requests per minute.

POST /v1/messages/count_tokens counts toward the limit too.

Headers

Every model response carries:

HeaderMeaning
x-ratelimit-limitThe key's limit per minute
x-ratelimit-remainingRequests left in the current window
x-ratelimit-resetSeconds until the window resets
Retry-AfterOn 429 and on retryable 503: seconds to wait

Over the limit

The request returns HTTP 429 rate_limited and is not sent to a model:

{"error": {"message": "Rate limit of 600 requests per minute for this key was exceeded. Retry after 12 seconds.", "type": "rate_limit_error", "param": null, "code": "rate_limited"}}

Wait for the number of seconds in Retry-After before you retry.

Other 429 codes

A 429 can also mean a spending limit, not a rate:

CodeMeaningWhat to do
key_limit_exceededThe key reached its daily or monthly limitRaise the key's limit, or wait until the time in the message
project_budget_exceededThe key's project reached its daily or monthly budgetRaise the project budget, or wait until the time in the message

See 4xx errors.