Skip to main content

Error Codes

All errors return JSON with an error object:

{
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests. Retry after 30 seconds.",
"retry_after": 30
}
}

HTTP Status Codes

CodeMeaningCommon Cause
400Bad RequestInvalid JSON, missing required fields
401UnauthorizedMissing or invalid API key / JWT token
403ForbiddenInsufficient permissions for this resource
404Not FoundResource doesn't exist
409ConflictDuplicate resource (entity already exists)
422Validation ErrorInvalid parameter values
429Rate LimitedToo many requests — check Retry-After header
500Server ErrorInternal error — contact support
502Bad GatewayService temporarily unavailable
503Service UnavailableMaintenance or overload

Error Codes

CodeStatusDescriptionFix
INVALID_API_KEY401API key is invalid or expiredGenerate a new key at /dashboard/api-keys
TOKEN_EXPIRED401JWT token has expiredRefresh the token
RATE_LIMITED429Request rate exceededWait for retry_after seconds
CREDIT_EXHAUSTED402No API credits remainingUpgrade plan or purchase credits
PROJECT_NOT_FOUND404Project ID doesn't existCheck project ID
VECTOR_LIMIT_EXCEEDED403Vector storage limit reachedUpgrade plan
FILE_TOO_LARGE413File exceeds size limitCheck tier limits
VALIDATION_ERROR422Request body validation failedCheck parameter types and ranges

Rate Limit Headers

Every response includes rate limit headers:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 55
X-RateLimit-Reset: 1700000060
Retry-After: 30

Retry Strategy

import time
import requests

def api_call_with_retry(url, data, max_retries=3):
for attempt in range(max_retries):
response = requests.post(url, json=data, headers=HEADERS)
if response.status_code == 429:
retry_after = int(response.headers.get('Retry-After', 30))
time.sleep(retry_after)
continue
return response
raise Exception("Max retries exceeded")