Error Response Format
All errors follow a consistent format:HTTP Status Codes
| Status | Meaning | Action |
|---|---|---|
400 | Bad Request | Check request body/parameters |
401 | Unauthorized | Check API key |
403 | Forbidden | Check permissions/licenses |
404 | Not Found | Check resource ID |
429 | Rate Limited | Wait and retry |
500 | Server Error | Retry with backoff |
Common Errors
Authentication Errors (401)
- Ensure
X-Api-Keyheader is present - Check the key hasn’t been revoked
- Verify the key format (
pk_live_...)
License Errors (403)
- Check your licensed personas with
GET /personas - Contact support to license additional personas
Validation Errors (400)
- Check request body matches schema
- Ensure required fields are present
- Validate content length limits
Rate Limit Errors (429)
- Wait for
retry_afterseconds - Implement request queuing
- Contact support for higher limits
Error Handling Patterns
Basic Error Handler
Retry with Exponential Backoff
Graceful Degradation
User-Facing Error Messages
Map error codes to user-friendly messages:Monitoring & Alerting
Track errors in your integration:Next Steps
Rate Limits
Understand API rate limits.
API Reference
Complete API documentation.