Mistral API error
Mistral API 504 Gateway timeout: what it means and how to fix it
504 Gateway timeoutRetry? YesLast verified 2 documented fixes2 sources
What it means
The request took too long to process.
Causes
- Very long prompts or high max_tokens values
- Server under heavy load
How to fix it
- Fix 1.
Reduce input size or max_tokens.
- Fix 2.
If using streaming, make sure your client handles the connection properly (streaming connections time out after 10 minutes of inactivity). Retry after a brief delay.
More Mistral API errors
All 11 Mistral API errorsHTTP 504 at other providers
FAQ
What does the Mistral API error "504 Gateway timeout" mean?
The request took too long to process.
How do I fix Mistral API "504 Gateway timeout"?
There are 2 documented fixes. Start with the first: Reduce input size or max_tokens.
Should I retry Mistral API "504 Gateway timeout"?
Yes. The official docs treat this error as retryable.
Which other AI APIs return HTTP 504?
Per their official error docs: Anthropic API (504 timeout_error), Gemini API (504 deadline_exceeded; 504 DEADLINE_EXCEEDED), OpenRouter (504 timeout), Vertex AI (504 DEADLINE_EXCEEDED).
Sources
Last verified against 2 sources: Mistral API's official docs and official SDK repositories.
- docs.mistral.aihttps://docs.mistral.ai/resources/error-glossary
- docs.mistral.aihttps://docs.mistral.ai/resources/known-limitations
Newsletter
Know when the APIs change
One email per week. New model releases, API changes, what broke, and how developers are working around it.