Documentation
Error Handling in the NexoRouter documentation.
Error Handling
Status: Stable public guidance.
NexoRouter returns OpenAI-style JSON errors for documented public endpoints. Start with error.code, then use Usage Logs to confirm the failing key, model, and request ID.
Common codes
| Code | Typical cause | First fix |
|---|---|---|
invalid_request | Malformed body or invalid parameter range. | Check JSON, messages, max_tokens, temperature, and top_p. |
invalid_api_key | Missing, wrong, expired, disabled, or mismatched key. | Recreate or reveal the correct key. |
model_not_found | Model ID typo or key model scope issue. | Copy exact model ID from Models. |
insufficient_quota | Account balance or key budget is insufficient. | Add balance or create a replacement key with the right budget. |
rate_limit_exceeded | Request volume exceeded. | Back off and reduce concurrency. |
request_too_large | Single request is too large. | Split the input. |
upstream_request_timeout | Provider response did not complete in time. | Increase client timeout or try another model. |
Support handoff
When contacting support, include:
- request ID
- timestamp
- API key name, not the secret value
- model ID
- endpoint path
- sanitized request body shape
- observed error code