Reference
Error Codes
The Extralt API returns standard HTTP status codes with JSON error bodies.
{
"error": "ErrorType",
"message": "Human-readable description of the error"
}
| Code | Error | Description | Solution |
|---|
401 | Unauthorized | Missing or invalid API key | Check your Authorization: Bearer <key> header |
403 | Forbidden | API key does not have access to this resource | Verify the key belongs to the correct organization |
| Code | Error | Description | Solution |
|---|
400 | Bad Request | Request body is malformed or missing required fields | Check the request body against the API docs |
404 | Not Found | The requested resource does not exist | Verify the resource ID is correct |
422 | Unprocessable Entity | Request is valid JSON but contains invalid values | Check field types and constraints |
| Code | Error | Description | Solution |
|---|
429 | Too Many Requests | Rate limit exceeded | Wait 15 seconds and retry. See Rate Limits |
| Code | Error | Description | Solution |
|---|
402 | Payment Required | Insufficient credits to perform the operation | Check your credit balance and upgrade if needed |
409 | Conflict | Resource already exists (e.g., duplicate robot build) | Use the existing resource instead |
| Code | Error | Description | Solution |
|---|
500 | Internal Server Error | Unexpected server error | Retry the request. If persistent, contact support |
503 | Service Unavailable | Service temporarily unavailable | Wait and retry with exponential backoff |
response = requests.post(f"{BASE_URL}/runs", headers=HEADERS, json=data)
if response.status_code == 401:
print("Check your API key")
elif response.status_code == 402:
print("Insufficient credits")
elif response.status_code == 429:
time.sleep(15)
# Retry the request
elif response.status_code >= 400:
error = response.json()
print(f"Error {response.status_code}: {error['message']}")