오류 및 멱등성
표준 오류, 재시도, 속도 제한, 중복 방지입니다.
오류는 application/problem+json, 실제 HTTP 상태, request_id를 사용합니다.
생성 요청에는 8~128자의 Idempotency-Key가 필요합니다. 서버는 Key의 HMAC과 요청 지문만 저장합니다. 같은 Key/본문은 원래 작업을 반환하고, 같은 Key/다른 본문은 409 idempotency_conflict, 처리 중이면 409 request_in_progress를 반환합니다. 자동 재시도 중 새 Key를 만들지 마세요.
주요 코드: invalid_api_key, invalid_api_key_rate_limited, api_key_expired, insufficient_scope, validation_error, unsupported_model, unsupported_parameter, input_url_not_allowed, insufficient_credits, payment_required, account_suspended, network_not_allowed, rate_limit_exceeded, concurrency_limit_exceeded, provider_unavailable, service_unavailable.
같은 IP에서 잘못된 자격 증명을 반복해도 제한되며 Pepper HMAC 처리된 IP 지문만 저장합니다.
네트워크 오류, 429, 503은 백오프 후 같은 본문과 같은 Key로 재시도할 수 있습니다. Provider 결과를 확인할 수 없으면 API는 맹목적인 재제출을 거부합니다.
재시도하기 전에 항상 Retry-After header를 따르세요.