Error response format
{
"code": "RATE_LIMITED",
"message": "Rate limit exceeded. Maximum 200 requests per minute.",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"docs_url": "https://openapi-doc.trenz.ai/errors/RATE_LIMITED"
}
Client errors (4xx)
| HTTP | code | Description | Resolution |
|---|
| 400 | BAD_REQUEST | Invalid request parameters | Check parameter format and value range |
| 400 | INVALID_PARAM | Invalid parameter value | See the specific field hint in message |
| 400 | MISSING_PARAM | Required parameter missing | Add the required field hinted in message |
| 400 | INVALID_SORT_FIELD | Invalid sort field | Check if sort is a supported field |
| 400 | INVALID_INCLUDE | Invalid include parameter | Check if include targets a supported sub-resource |
| 400 | PAGE_SIZE_EXCEEDED | Page size out of range | Reduce the page_size value |
| 401 | AUTH_MISSING_KEY | Missing API key | Add X-API-Key or Authorization: Bearer sk_... |
| 401 | AUTH_INVALID_KEY | Invalid API key | Check that the key starts with sk_live_ |
| 401 | AUTH_KEY_REVOKED | API key has been revoked | Use a new API key |
| 401 | AUTH_KEY_SUSPENDED | API key is suspended | Contact support to reinstate |
| 402 | INSUFFICIENT_BALANCE | Insufficient balance | Top up and retry |
| 403 | FORBIDDEN_SCOPE | Not authorized | Confirm the scope of this API key |
| 404 | ROUTE_NOT_FOUND | Endpoint not found | Check the request path |
| 404 | TASK_NOT_FOUND | Async task not found | Check the task_id |
| 429 | RATE_LIMITED | Rate limit exceeded | Slow down; honor the Retry-After response header |
| 429 | QUOTA_EXCEEDED | Quota exceeded | Wait for quota reset or upgrade your plan |
Server errors (5xx)
| HTTP | code | Description | Resolution |
|---|
| 500 | INTERNAL_ERROR | Internal service error | Contact support with the request_id |
| 502 | BACKEND_ERROR | Backend service error | Retry later |
| 503 | BACKEND_UNAVAILABLE | Backend unavailable | Retry later |
| 504 | BACKEND_TIMEOUT | Backend timeout | Retry later |
| Header | Description | When returned |
|---|
X-RateLimit-Limit | Max requests in current window | All requests |
X-RateLimit-Remaining | Remaining requests | Only on 429 (value is 0) |
Retry-After | Suggested wait in seconds | Only on 429 |
Last modified on