Skip to main content
HTTP status: 400

Error message

When this error occurs

thinking.budget_tokens is at or above max_tokens. Thinking tokens are spent from the same output budget as the answer, so a budget that fills max_tokens leaves the model nothing to answer with — the turn gets truncated mid-thought and the run fails later, with nothing useful to show for the spend.

How to fix

Raise max_tokens, lower budget_tokens, or both. Leave clear headroom: the budget is a ceiling on thinking alone, and the answer still has to fit in what remains.