Source: https://01router.com/docs/errors Base URL: https://01router.com/api/v1 # Errors Check the HTTP status and error.message. Some rate-limit responses use a message envelope and Retry-After. Error codes for a given status can vary by endpoint. ## Response fields | Field | Type | Required | Description | Constraints | | --- | --- | --- | --- | --- | | 400 · invalid_request | HTTP | — | Invalid body or parameter value | | | 401 · unauthorized | HTTP | — | Missing or invalid API key | | | 402 · insufficient_credits | HTTP | — | Not enough credits | | | 403 · invalid_request | HTTP | — | The key or project does not allow this model, provider or request origin. | | | 404 · not_found | HTTP | — | Unknown model or generation | | | 409 · not_cancelable | HTTP | — | The task cannot be canceled (already finished, or the provider does not support canceling) | | | 429 · rate_limited / concurrency_limit | HTTP | — | Too many requests — retry after the given seconds · Too many tasks running for this API key; wait for some to finish | | | 502 · upstream_error | HTTP | — | Every provider rejected the task (credits refunded) | | | 503 · no_provider / upstream_error | HTTP | — | No provider supports these parameters | | | 504 · timeout | HTTP | — | Image is still generating after the wait; poll GET /generations/:id | | ## 401 · application/json ```json { "error": { "message": "Invalid or missing API key", "code": "unauthorized" } } ``` ## Usage notes - Poll at intervals of at least 3 seconds. A 504 from the synchronous image endpoint means the task may still be running: poll its error.id instead of submitting it again.