Skip to main content

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, reduce max_tokens, or switch to a model with a larger context window.