Skip to content

Limits

Balance, key limits and rate limits.

Paid traffic is gated mainly by money, not by request counts: if your available balance covers a request's hold, it runs.

LimitScopeError
Available balance must cover the request's holdAccount402 insufficient_credits
Key spending limits: total, per UTC day, per UTC month (optional, set by you)API key402 key_limit_exceeded with limit
Key daily tokens (optional, set by you)API key429 key_token_limit_exceeded
Key requests at once (optional, set by you)API key429 concurrency_limited
Key expiry (optional, set by you)API key401 invalid_api_key
Request rate (600 requests per minute, in bursts of up to 600)API key429 rate_limited with Retry-After
Request body size (32 MiB, images included)Request413 invalid_request
Model context window and max outputModelShown on each model page

Images

Models with image in architecture.input_modalities (or capability_details.image_input in GET /models) take image parts in messages[].content: {"type": "image_url", "image_url": {"url": ...}}.

  • Size: the whole request body, base64 images included, must fit in 32 MiB. Base64 adds a third, so that is about 24 MiB of image data in total. Our backup supplier refuses a single image above about 10 MiB (13,981,514 base64 characters).
  • Formats: PNG, JPEG and WebP are documented by our suppliers. GIF is not; convert it.
  • How: a base64 data: URL always works. Public https:// URLs are accepted too; plain http:// is not documented.
  • Count: no per-request image limit is documented. Each image is reserved as up to 6,000 input tokens when the hold is computed, and billed at the tokens the model reports.

Monitoring your limits

  • GET /key returns each of the key's limits, its usage today, this month and in total, requests in flight, what it can still spend, and your balance.
  • GET /usage returns cost, tokens and requests per UTC day or per model, for the key or (with scope=account) the whole account. GET /generations lists your recent requests, metadata only. See Usage API.
  • The API keys page shows usage against each key's limits; change them with Edit limits.

Need a higher rate limit? Email us with your expected request volume.