Response Format
All errors follow the same structure:HTTP Status Codes
| Code | Name | Description |
|---|---|---|
200 | Success | Request processed successfully |
400 | Bad Request | Invalid request parameters or generation still processing |
401 | Unauthorized | API key missing or invalid |
402 | Insufficient Credits | Account balance too low to complete the request |
404 | Not Found | Endpoint or resource does not exist |
422 | Validation Error | Request parameters failed validation |
429 | Rate Limited | Too many requests — slow down and retry |
455 | Service Unavailable | System is under maintenance |
500 | Server Error | Unexpected internal error |
501 | Generation Failed | The model failed to generate output |
505 | Feature Disabled | The requested feature is currently disabled |
Common Errors and Fixes
401 Unauthorized
- Check that your
Authorizationheader is set toBearer <YOUR_API_KEY> - Verify the key exists and hasn’t been deleted
- Check that the requesting IP is in the key’s whitelist (if configured)
402 Insufficient Credits
Top up your balance at routerbase.com/billing or configure auto top-up.422 Validation Error
The request body is missing a required field or contains an invalid value. Check the model’s parameter documentation for required fields.429 Rate Limited
Implement exponential backoff:501 Generation Failed
The model accepted the task but could not produce output (e.g. content policy violation, provider error). Check theerror_message field in the task status response for details.