mistral-ai / Mistral API
Mistral API 400: Context Window Exceeded
A Mistral API request is too large for the chosen model’s context window when input and requested output tokens are considered together. The request exceeds the selected model’s documented token context window; output tokens count toward the total.
Visible symptoms
- HTTP 400 Bad Request.
- Request with very long input or max_tokens fails.
Safe verification and recovery
Check model context limit
Read the context-window size for the exact selected Mistral model.
Reduce total tokens
Shorten the input and/or lower max_tokens to stay within the model limit.
Matching evidence and limitations
Reported error signals
Matches the documented error signal; it identifies the documented case, not the exact root cause of your request.
The local analyzer never executes suggested commands or treats a possible match as certainty.