Documentation Index
Fetch the complete documentation index at: https://docs.arouter.ai/llms.txt
Use this file to discover all available pages before exploring further.
모델 폴백을 사용하면 우선순위 순서로 여러 후보 모델을 지정할 수 있습니다. 첫 번째 모델이 오류를 반환하거나, 타임아웃되거나, 사용 불가능한 경우 ARouter가 자동으로 다음 모델로 재시도합니다.
빠른 시작
{
"model": "openai/gpt-5.4-pro",
"models": ["openai/gpt-5.4-pro", "openai/gpt-5.4", "anthropic/claude-sonnet-4.6"],
"messages": [{"role": "user", "content": "Hello"}]
}
폴백 동작
| 시나리오 | 조치 |
|---|
기본 모델이 5xx 반환 | 다음 모델로 재시도 |
기본 모델이 속도 제한됨 (429) | 다음 모델로 재시도 |
| 기본 모델 사용 불가 | 다음 모델로 재시도 |
기본 모델이 4xx 반환 (잘못된 요청) | 즉시 오류 반환 |
| 모든 모델 실패 | 마지막으로 시도한 모델의 오류 반환 |
어떤 모델이 응답했는지 확인
응답의 model 필드는 항상 실제로 응답을 생성한 모델을 반영합니다.
실제로 응답한 모델에 대해서만 요금이 청구됩니다. 실패한 시도는 요금이 청구되지 않습니다.
공급자 폴백과 결합
{
"model": "openai/gpt-5.4-pro",
"models": ["openai/gpt-5.4-pro", "openai/gpt-5.4"],
"provider": {"order": ["Azure", "OpenAI"], "allow_fallbacks": true}
}
사용 사례
고가용성 프로덕션:
{"models": ["anthropic/claude-opus-4.5", "anthropic/claude-sonnet-4.6", "openai/gpt-5.4-pro"]}
품질 하한선을 유지하는 비용 최적화:
{"models": ["openai/gpt-5.4:free", "meta-llama/llama-4-maverick:free", "openai/gpt-5.4"]}