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

CodeTypical causeFirst fix
invalid_requestMalformed body or invalid parameter range.Check JSON, messages, max_tokens, temperature, and top_p.
invalid_api_keyMissing, wrong, expired, disabled, or mismatched key.Recreate or reveal the correct key.
model_not_foundModel ID typo or key model scope issue.Copy exact model ID from Models.
insufficient_quotaAccount balance or key budget is insufficient.Add balance or create a replacement key with the right budget.
rate_limit_exceededRequest volume exceeded.Back off and reduce concurrency.
request_too_largeSingle request is too large.Split the input.
upstream_request_timeoutProvider 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
Error Handling — NexoRouter