HTTP status
400 invalid_request_error
Typical cause
The combined prompt plus requested output tokens exceeds the target model’s context window.Resolution
Shorten the prompt, reducemax_tokens, or switch to a model with a larger context window.HTTP 400 — Token count exceeds the model’s context window.
400 invalid_request_error
max_tokens, or switch to a model with a larger context window.