Skip to main content

Errors

When your key is rejected​

A credential that does not resolve returns 401 Unauthorized with error.code of invalid_api_key. It may have been revoked or mistyped. It is not silently downgraded to the anonymous tier, so a broken key fails visibly rather than quietly spending your anonymous allowance. Sending no credential at all is still fine, and gives you the anonymous 10/day.

When you run out​

Both a rate limit and an empty credit wallet return 429 Too Many Requests, so check error.code to tell them apart, because they need opposite responses.

insufficient_credits means you are out of credits. Do not retry: no amount of backoff refills the wallet before resets_at. Wait for the reset, upgrade, or buy a top-up pack:

{
"error": {
"code": "insufficient_credits",
"message": "No credits left. Upgrade to Base or buy a credit pack.",
"plan_credits": 0,
"addon_credits": 0,
"resets_at": "2026-10-21T00:00:00+00:00"
}
}

rate_limit_exceeded means you sent requests too quickly: a burst ceiling of 300 requests per minute, separate from your credit balance. This one is safe to retry after a backoff, and the body carries retry_after in seconds:

{
"error": {
"code": "rate_limit_exceeded",
"message": "...",
"resets_at": "2026-03-02T00:00:00+00:00"
}
}