Error Response Format
When an error occurs, the API returns a JSON response with the following structure:code, not on message: code is a stable token, while message is
prose that gets reworded and is sometimes forwarded verbatim from a third-party
provider.
Error codes
The same list is published as
x-error-model.codes in
openapi.json, typed as the
GenerationError schema.
Some legacy endpoints may return
messege instead of message. Handle both fields for compatibility.Control-plane errors
The agent control plane (/api/agents/v1) uses real HTTP status codes and a
different envelope — every response, success or failure, has the same three keys:
error is null and data carries the payload. Quote meta.request_id
when reporting a failure. Typed as AgentErrorEnvelope in
agents-openapi.json.
HTTP Status Codes
400 - Bad Request
400 - Bad Request
Cause: The request contains invalid parameters or is malformed.Common Issues:Solution: Review your request parameters against the API documentation. Ensure all required fields are included and properly formatted.
- Missing required parameter (e.g.,
prompt,key) - Invalid parameter type (e.g., string instead of number)
- Parameter value out of allowed range
- Malformed JSON in request body
402 - Payment Required
402 - Payment Required
Cause: Insufficient credits or expired subscription.Example Response:Solution: Add credits or renew your subscription from your dashboard or view pricing plans.
403 - Forbidden
403 - Forbidden
Cause: The requested feature is not available on your current plan.Example Response:Solution: Upgrade your subscription to access this feature.
429 - Too Many Requests
429 - Too Many Requests
Cause: You’ve exceeded your rate limit (queue limit).Example Response:Solution:
- Wait for current requests to complete
- Implement exponential backoff in your code
- Consider upgrading your plan for higher limits
500 - Server Error
500 - Server Error
Cause: An internal server error occurred during processing.Example Response:Solution:
- Wait a few seconds and retry the request
- If the error persists, check the status page
- Contact support if the issue continues
Common Error Scenarios
Missing Required Parameters
Invalid Model ID
Image URL Issues
Handling Errors in Code
Python
JavaScript
Validation Errors
When request validation fails, you’ll receive specific error messages:Processing Status vs Errors
Not all non-success responses are errors. Some indicate the request is still processing:Getting Help
Discord
Get community help
Email Support
Contact support team
Status Page
Check service status

