Skip to main content

Overview

Rate limits are tier-based and applied per API key. Limits vary by account tier and model. Creating additional accounts or keys does not bypass global capacity limits.

Checking Limits

Query your API key status:

Query Parameters

  • details=true: Include detailed usage statistics

Basic Request

Detailed Request

Response Format

Basic Response

Detailed Response

With details=true:

Response Fields

Usage Statistics

usage_stats contains:
  • last_7_days: Object with cost and requests
  • last_30_days: Object with cost and requests

Rate Limit Behavior

429 Too Many Requests

When rate limits are exceeded:

Rate Limit Headers

Responses may include rate limit headers (if supported):

Tier-Based Limits

Limits vary by account tier:
  • Free Tier: Lower limits, daily caps
  • Standard (Tier 2): Higher limits
  • Enterprise: Custom limits
Check your tier via the /v1/key endpoint.

Model-Specific Limits

Different models may have different rate limits. Distribute usage across models if needed to maximize throughput.

Free Tier Limits

Free-tier models have additional restrictions:
  • Daily request caps
  • Per-minute request limits
  • Model availability restrictions

Negative Balance

If account balance is below zero, all requests (including free-tier) fail with 402 Payment Required until credits are added.

DDoS Protection

Excessive request bursts may be blocked. Implement:
  • Request throttling
  • Exponential backoff
  • Rate limit monitoring

Monitoring Usage

Programmatic Monitoring

Best Practices

  1. Monitor Regularly: Check usage via /v1/key endpoint
  2. Handle 429: Implement exponential backoff
  3. Distribute Load: Use multiple models to maximize throughput
  4. Set Alerts: Monitor balance and usage thresholds
  5. Respect Limits: Don’t attempt to bypass rate limits

See Also