Skip to main content

Error Handling

The API uses standard HTTP status codes and returns detailed error messages.

Error Response Format

{
"success": false,
"message": "Human-readable message",
"code": "error_code",
"content": {
"field": "additional_info"
}
}

code and content are optional. Always branch on the HTTP status and success; use code when an endpoint provides a machine-readable reason.

HTTP Status Codes

CodeDescription
400Bad Request - Invalid parameters
401Unauthorized - Invalid API key
403Forbidden - Insufficient permissions
404Not Found - Resource doesn't exist
429Too Many Requests - Rate limited
500Internal Server Error

Common Error Codes

CodeDescription
invalid_requestRequest body is malformed
missing_parameterRequired parameter missing
invalid_parameterParameter value is invalid
unauthorizedAPI key issue
endpoint-specific messageToo many requests; inspect HTTP 429 and Retry-After
insufficient_creditsNot enough credits
resource_not_foundCheck/resource not found