working-with-messages changedbuild-with-claude/working-with-messages
Nearest release: v2.1.332, published 3 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+4added
Lines−0removed
From line
371
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits32to this page, all time
The whole hunk
from line 371, old and new numbered
/
from line 371
371371* **Claude 4.5 and earlier models:** The API accepts a prefill unless the model is retired on the platform that you use. All requests to a retired model fail. To check a model’s status, see [Model deprecations](https://platform.claude.com/docs/en/about-claude/model-deprecations).
372372* **All other models:** The API returns a 400 error (see the [Prefill not supported](https://platform.claude.com/docs/en/api/errors#prefill-not-supported) section of the Claude API errors page). Use one of the [alternatives to a prefill](https://platform.claude.com/docs/en/build-with-claude/working-with-messages#alternatives-to-a-prefill) instead.
373373
374Claude Opus 4.5 is deprecated on [Anthropic-operated platforms](https://platform.claude.com/docs/en/about-claude/model-deprecations#overview). Claude Sonnet 4.5 is deprecated on the same platforms. For retirement dates and recommended replacements, see [Deprecation history](https://platform.claude.com/docs/en/about-claude/model-deprecations#deprecation-history) on the Model deprecations page. [Partner-operated platforms](https://platform.claude.com/docs/en/about-claude/model-deprecations#overview) set their own retirement schedules.
375
376The recommended replacements for Claude Opus 4.5 and Claude Sonnet 4.5 don’t accept a prefill.
377
374378The following example runs on Claude Opus 4.5 and sets the format of a multiple-choice answer. The prefill, `The answer is (`, ends right before the answer’s letter so that Claude writes the letter first. Because the answer is one letter, the example also sets `max_tokens` to `1`. For a longer answer, set a higher `max_tokens`.
375379
376380<CodeGroup>
No line in this hunk matches that.