DEV Community

Sangmin Lee
Sangmin Lee

Posted on • Originally published at claudeguide.io

Claude API 404 not_found_error: 원인과 해결법 (2026)

Originally published at claudeguide.io/claude-api-error-404

Claude API 404 not_found_error: 원인과 해결법 (2026)

Claude API 404 not_found_error는 model 이름, message ID, batch ID 등이 존재하지 않는 경우에 발생합니다. 리소스 없음이며, 재시도하지 말고 요청 자체를 수정해야 합니다. 이 글은 5가지 흔한 원인과 Python/TypeScript 코드 예시를 다룹니다.

전반적인 Claude API 에러 처리 패턴은 Claude API Error Handling 가이드를 참고하세요.


무엇을 의미하는가?

404 HTTP 상태 코드는 model 이름, message ID, batch ID 등이 존재하지 않는 경우을 의미합니다. Anthropic API의 에러 응답 본문에는 error.type"not_found_error"로 명시되며, error.message에 구체적 사유가 옵니다.

응답 예시:

{
  "type": "error",
  "error": {
    "type": "not_found_error",
    "message": "..."
  }
}
Enter fullscreen mode Exit fullscreen mode

흔한 원인 5가지

  1. 모델 이름 오타 (예: claude-sonnet-4claude-sonnet-4-5)
  2. 사용 중지된 모델 사용 (예: claude-2.0, claude-instant)
  3. Region별 모델 차이 (Bedrock에서 일부 모델 미지원)
  4. Batch ID나 message ID가 만료됨 (29일)

해결 코드 (Python)

# Always use the latest model identifiers
LATEST_MODELS = {
    "haiku": "claude-haiku-4-5",
    "sonnet": "claude-sonnet-4-5",
    "opus": "claude-opus-4-5",
}

def safe_model(tier: str):
    if tier not in LATEST_MODELS:
        raise ValueError(f"Unknown tier: {tier}")
    return LATEST_MODELS[tier]
Enter fullscreen mode Exit fullscreen mode

해결 코드 (TypeScript)


typescript
const LATEST_MODELS: Record<string, string
Enter fullscreen mode Exit fullscreen mode

Top comments (0)