OpenRouter error
OpenRouter 412 precondition_failed: what it means and how to fix it
Error message
412 precondition_failedRetry? Not statedLast verified 1 documented fix1 source
What it means
A precondition header (for example If-Match) was not satisfied.
Causes
- If-Match or similar precondition header not satisfied
How to fix it
- Fix 1.
Re-check the precondition header value.
More OpenRouter errors
All 32 OpenRouter errors400 invalid_requestRetry? Not stated400 invalid_promptRetry? Not stated400 context_length_exceededRetry? Not stated400 max_tokens_exceededRetry? Not stated400 token_limit_exceededRetry? Not stated400 string_too_longRetry? Not stated400 invalid_imageRetry? Not stated400 image_too_largeRetry? Not stated
FAQ
What does the OpenRouter error "412 precondition_failed" mean?
A precondition header (for example If-Match) was not satisfied.
How do I fix OpenRouter "412 precondition_failed"?
Re-check the precondition header value.
Should I retry OpenRouter "412 precondition_failed"?
Not stated. The official docs do not say whether this error is retryable.
Sources
Last verified against 1 source: OpenRouter's official docs and official SDK repositories.
Newsletter
Know when the APIs change
One email per week. New model releases, API changes, what broke, and how developers are working around it.