← Help center

Aliases, routing and fallback

An alias has up to five targets. The gateway tries them in order and moves to the next one when a target returns HTTP 5xx or 429, times out (timeout per attempt is set under Limits & logging), or can't be reached. A 4xx error such as an invalid request is returned to you without trying other targets, because another provider would usually reject it too.

You can also skip aliases and call provider-name/model, e.g. openai-main/gpt-4o-mini. Disabled providers are skipped.

Anthropic translation: system messages become the system field, consecutive turns of the same role are merged, stop becomes stop_sequences, and max_tokens defaults to 1024 when you don't send it (Anthropic requires it). Stop reasons map to OpenAI's finish_reason values and usage maps to prompt_tokens/completion_tokens.