Skip to main content

Error Response Format

All errors follow a consistent format:

HTTP Status Codes

Common Errors

Authentication Errors (401)

Solutions:
  • Ensure X-Api-Key header is present
  • Check the key hasn’t been revoked
  • Verify the key format (pk_live_...)

License Errors (403)

Solutions:
  • Check your licensed personas with GET /personas
  • Contact support to license additional personas

Validation Errors (400)

Solutions:
  • Check request body matches schema
  • Ensure required fields are present
  • Validate content length limits

Rate Limit Errors (429)

Solutions:
  • Wait for retry_after seconds
  • 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.