# 404 not_found_error: verify path, IDs, and model lifecycle
Something in the URL does not exist. Work through the candidates in order.
## What to do
1. Check the endpoint path against the API reference. Typos in the path are the top cause.
2. Check every resource ID embedded in the URL: message IDs, batch IDs, file IDs, model names. One stale ID from a cached list 404s the whole call.
3. If the 404 names a model, check the model deprecations page. Retired models fail on request; a model ID that worked last quarter may be retired now. Migrate to the recommended replacement.
4. In the SDKs, catch the typed exception (for example anthropic.NotFoundError in Python) rather than string-matching the message. Catch the most specific exception class first, then the general ones.
5. Retry policy: a 404 never clears by retrying. Fix the identifier.
## The trap
String-matching error messages to detect 404s. Messages can change; the error type and status code are the stable contract, and the SDKs give you typed exceptions for exactly this. The other trap: a hardcoded model ID in a config file that quietly retired, turning a working pipeline into a 404 farm overnight.
## Checklist
- Audit hardcoded model IDs on a schedule. Retirement gives at least 60 days notice for public models; the notice only helps if someone reads it.
- The error response always includes a request_id. Include it if you need support, since a 404 you cannot explain is worth one ticket, not ten retries.