Reference

Error Codes

The Extralt API returns standard HTTP status codes with JSON error bodies.

Error response format

{
  "error": "ErrorType",
  "message": "Human-readable description of the error"
}

Authentication errors

CodeErrorDescriptionSolution
401UnauthorizedMissing or invalid API keyCheck your Authorization: Bearer <key> header
403ForbiddenAPI key does not have access to this resourceVerify the key belongs to the correct organization

Validation errors

CodeErrorDescriptionSolution
400Bad RequestRequest body is malformed or missing required fieldsCheck the request body against the API docs
404Not FoundThe requested resource does not existVerify the resource ID is correct
422Unprocessable EntityRequest is valid JSON but contains invalid valuesCheck field types and constraints

Rate limit errors

CodeErrorDescriptionSolution
429Too Many RequestsRate limit exceededWait 15 seconds and retry. See Rate Limits

Resource errors

CodeErrorDescriptionSolution
402Payment RequiredInsufficient credits to perform the operationCheck your credit balance and upgrade if needed
409ConflictResource already exists (e.g., duplicate robot build)Use the existing resource instead

Server errors

CodeErrorDescriptionSolution
500Internal Server ErrorUnexpected server errorRetry the request. If persistent, contact support
503Service UnavailableService temporarily unavailableWait and retry with exponential backoff

Handling errors in code

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']}")

What's next