API keeps cutting my blog drafts off mid sentence

Generating 1,500 word drafts through the chat completions endpoint and they stop at around 600 words, sometimes mid sentence. ChatGPT itself writes the full length fine. Is this a max tokens thing I've overlooked?
2

Leave A Reply

Log in to post an answer.

2 Answers

santosh_uk Oct 30, 2026
ben_18
If the stop reason isn't length, check your own code. When streaming, people often stop reading before the stream has actually finished and only save part of it. And if a draft did hit the limit, you can send what you got back and ask it to carry on from exactly that point, rather than regenerating the whole thing.
mayur_seo Oct 09, 2026
ben_18
output token limit. the stop reason in the response will say length. raise max tokens, or for long drafts generate section by section from an outline.