OceanirDocs
API
Authentication

Rate Limits

Every API key has a per-minute and a per-hour limit, and requests are also limited at the gateway. Here is what each layer does and how to handle a 429.

Limit tiers

These are the default limits a key is issued with by tier. Enterprise limits are set in the agreement, so the figures for that tier are a starting point. The maximum image size is 20 MB on every tier.

TierPer minutePer hour
Free10100
Pro10100
Enterprise10010,000

Reading your limits

Every API response includes RFC 9331 RateLimit and RateLimit-Policy plus the legacy X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers.

These headers describe the gateway limit, which counts requests per client address and is shared by all endpoints. The per-key limits in the table above are checked separately and are not shown in the headers. When either limit is hit you get a 429 with a Retry-After header, so back off by that many seconds. There is no endpoint that reports a key's remaining per-key quota. Check credits and metered usage with GET /api/v1/credits and GET /api/v1/usage.

Handling 429 Errors

When a key goes over its per-minute or per-hour limit, the API returns a 429 Too Many Requests response with a typed error body. A gateway 429 also carries Retry-After, but its body is shorter.

JSON Response
{
  "success": false,
  "error": "Rate limit exceeded.",
  "code": "rate_limited",
  "message": "Rate limit exceeded.",
  "hint": "Wait for the Retry-After header, then retry.",
  "details": { "retry_after": 60 },
  "status": 429
}

Best practices

  • Exponential Backoff

    Implement a retry strategy that increases delay between attempts after receiving a 429 response.

  • Caching

    Store results locally for images you have already analyzed, so you do not pay for the same analysis twice.

  • Batching

    For high-volume archival tasks, spread requests over a longer period to stay within the hourly limit.

  • Monitoring

    Keep track of usage via the Settings dashboard.