DocsAPI reference
Rate limits
Enough for a busy tool, and enough headroom that one script cannot drain an account by mistake.
| Limit | Value |
|---|---|
| Requests per minute | 60 per API key. An account with 5 keys gets 5 × 60. |
| Playground | 60 per minute per account. |
| Active API keys | 5 per account. Revoke one to make room. |
| Key name | 40 characters. |
| Images per request | 1 to 4. |
| Video length | 1 to 20 seconds. |
| Usage page size | 100 rows by default, 500 at most. |
| Model catalog refresh | Every 10 minutes. |
Over the limit#
429
HTTP/1.1 429 Too Many Requests
{
"error": {
"message": "Rate limit reached: 60 requests per minute per key.",
"type": "invalid_request_error",
"code": "rate_limit_exceeded"
}
}The window is a rolling 60 seconds, counted per key in memory. Authenticated responses carry x-ratelimit-limit and x-ratelimit-remaining so a client can pace itself before it hits the wall. The 401 and 429 responses themselves carry neither.
CORS#
Every /v1 route answers preflight with 204 and allows any origin, the authorization, x-api-key, anthropic-version and content-type headers, and exposes the billing, request-id and rate-limit headers to browser code. That said, a key in a browser is a key anyone can take; keep keys on a server.
