Skip to main content

Daily limits

Every metered key has two independent daily caps, reset at midnight UTC:
LimitDefaultBehavior when hit
Requests per day10,000429 with code: "daily_request_limit"
Spend per day$50.00429 with code: "daily_spend_limit"
Both are checked before the request runs, so a blocked request is never billed. Caps are configured per key — ask us if your workload needs more. Partner (unmetered) keys have no daily caps. Request size limits: at most 1,000 messages per request, and max_tokens may not exceed the model’s context length.

Error envelope

Errors follow the OpenAI format, so existing SDK error handling works:
{
  "error": {
    "message": "Daily spend limit reached for this key",
    "type": "rate_limit_error",
    "code": "daily_spend_limit"
  },
  "limit": { "type": "spend", "cap": 50000000 }
}
The extra limit object appears only on 429 responses — cap is the configured cap (requests, or spend in micro-USD).

Status codes

StatusTypeWhen
400invalid_request_errorMalformed JSON, unknown model, invalid parameters
401authentication_error / invalid_api_keyMissing, invalid, or revoked key
402payment requiredNo key and no valid x402 payment — response carries the payment challenge
429rate_limit_errorDaily request or spend cap reached (see above)
5xxserver_error / upstreamUpstream model failure or gateway error — any reserved hold is released, nothing is billed

Handling failures

  • Retries: 5xx responses are safe to retry — failed calls are never charged. Use exponential backoff; don’t retry 400/401.
  • 429: back off until midnight UTC or switch to a cheaper model; the limit object tells you which cap you hit.
  • Support: every response includes an X-Request-Id header. Include it in any report — we can trace the exact request.

Insufficient credits

When a metered key’s prepaid balance can’t cover a request’s reserve, the request is rejected before running. Top-up terms are part of your access agreement — contact us to add credits or review your invoice schedule.