Cogito returns a single, deterministic error shape on every failure:Documentation Index
Fetch the complete documentation index at: https://docs.cogito.decart.ai/llms.txt
Use this file to discover all available pages before exploring further.
request_id. We trace it through the gateway, scheduler, and inference cluster. Support can pinpoint your request from this single ID.
Error types
| Type | HTTP | When |
|---|---|---|
invalid_request_error | 400 | Malformed JSON, missing required field, invalid params |
authentication_error | 401 | Missing / revoked API key |
permission_denied | 403 | Key doesn’t have access to a model or feature |
not_found | 404 | Unknown model slug, unknown fine-tune |
rate_limit_exceeded | 429 | Token-aware rate limit hit; retry with backoff |
insufficient_quota | 429 | Spend cap reached or balance exhausted |
internal_server_error | 500 | Cogito problem; retry safe |
service_unavailable | 503 | Inference cluster temporarily degraded; retry with backoff |
Common codes
invalid_api_key— header missing or revokedmodel_not_found— slug typo or model retiredcontext_length_exceeded— prompt + max_tokens exceeds the model’s windowspend_cap_reached— your monthly hard cap; raise it in dashboardtokens_per_minute_exceeded— TPM rate limit; back off and retryrequests_per_minute_exceeded— RPM rate limit; back off and retryinvalid_response_format— JSON schema is malformed or impossible
Retry-after
429 and 503 responses include a Retry-After header (seconds). Honor it. Exponential backoff on top of Retry-After is fine; ignoring it will get you rate-limited harder.