Errors
Routeur returns short, JSON-shaped errors with a stable error.code and a human-readable error.message. Raw upstream provider error bodies are never relayed to callers — you'll always see a routeur-shaped envelope.
Error shape
{
"error": {
"code": "blocked_by_dlp",
"message": "dlp:credit_card_redact",
"type": "routeur_error"
}
}
Status & codes
invalid_requestMalformed JSON or missing required fields such as messages.
unauthorizedMissing or unknown routeur.ai bearer token. See Authentication.
blocked_by_dlpInput safety or DLP blocked the request before the upstream call. The matching rule name is in error.message.
blocked_by_moderationThe upstream model answered but output moderation blocked the response from reaching the caller.
rate_limitedPer-key request or token rate cap exceeded. See Rate limits.
upstream_errorNon-timeout upstream failure or provider_unconfigured when no provider key is mounted.
upstream_errorThe upstream call hit routeur.ai's per-request timeout. Safe to retry idempotently.
Retry guidance
- Retry:
429,502,504with exponential backoff. - Do not retry:
400,401,403. The request will keep failing.