Error Format
Most error responses return a JSON object like:| Field | Type | Description |
|---|---|---|
error | integer | HTTP status code |
message | string | Human-readable description |
code | string | Machine-readable reason code |
Rate Limit Headers
All endpoints protected by the rate limiter return these headers:| Header | Description |
|---|---|
X-RateLimit-Limit | Requests allowed per window (per apiKey) |
X-RateLimit-Remaining | Requests left in the current window |
X-RateLimit-Reset | Unix timestamp when the window resets |
429), you also receive:
| Header | Description |
|---|---|
Retry-After | Seconds to wait before retrying |
Common Error Responses
400 — Bad Request
401 — Unauthorized
Missing or invalidapiKey.
403 — Forbidden
Valid API key, but no access to this channel or feature.422 — Validation Error
Usually returned by FastAPI’s internal validation.429 — Rate Limit Exceeded
Triggered when request volume exceeds limits per apiKey.Retry-After: 1X-RateLimit-Limit: 30X-RateLimit-Remaining: 0X-RateLimit-Reset: 1700000000
503 — Service Unavailable
If internal systems (e.g. rate limiter) are unavailable:Notes
codeis stable and suitable for programmatic handling.messagemay change (but is designed to help developers).- Most endpoints return
429if rate-limited — check your headers. - FastAPI validation errors are always returned as
422.