Error Handling
All OpenBits API responses follow a consistent envelope format. Errors include machine-readable codes for programmatic handling.Response Format
Success
Error
Error Codes
Authentication Errors (4xx)
Billing Errors
Rate Limiting
Resource Errors
Validation Errors
Server Errors
Retry Logic
Credits are automatically refunded on upstream 5xx errors. Rate-limited requests (429) are rejected before credit deduction, so no credits are charged.
429— Wait forretry-afterseconds, then retry502— Upstream error, retry with exponential backoff500— Server error, retry with backoff (up to 3 attempts)
400,401,403,404,422— Fix the request first402— Add credits or upgrade your plan
Request IDs
Every response includes anx-request-id header. Include this ID when contacting support — it allows us to trace the full request lifecycle in our logs.