Skip to content
Back to blog
AI Tools

Claude Haiku 5.5 API 400 Error: Causes and How to Fix It

The Claude Haiku 5.5 API returns a 400 error for budget_tokens, temperature, top_p, top_k and prefill. Fixes per item, plus token and price changes as of Oct 10, 2026.

5 min readAI Tools
Claude Haiku 5.5Claude APIClaude API 400 errortemperatureAnthropic
Claude Haiku 5.5 API 400 Error: Causes and How to Fix It

The Claude Haiku 5.5 API returns a 400 error for requests written for Haiku 4.5 that include budget_tokens, temperature, top_p, top_k, or an assistant prefill. Anthropic's release notes say Haiku 5.5 (claude-haiku-5-5) launched on October 7, 2026. Changing only the model ID will not make your existing code run. Below you will find which items trigger a 400, how to fix them, and what changes in tokens and pricing (as of October 10, 2026).

Requests that cause a 400 error in the Claude Haiku 5.5 API

According to Anthropic's migration guide, the requests below are rejected by Haiku 5.5.

Value in the requestHaiku 5.5 resultHow to fix
thinking: {"type": "enabled", "budget_tokens": N}400Change thinking to {"type": "adaptive"} and control thinking depth with output_config.effort
temperature400 unless it is 1Remove it from the request
top_p400 unless it is 0.99 (the default); 1 also returns 400Remove it from the request
top_k400 for any valueRemove it from the request
Using temperature and top_p together400Remove both
Prefill, where messages ends with an assistant turn400 even with thinking offEnd with a user turn and replace the prefill based on its purpose
computer_20250124 tool400Use computer_toolset_20260801 on the Claude API and Google Cloud, or computer_20251124 on Amazon Bedrock (computer use migration notes)
Resending thinking blocks after changing system, tools, or earlier messages400Keep the conversation append-only (see this note)

For the thinking block item, if your account was created before 00:00 UTC on August 31, 2026, the error only occurs on requests that set thinking.block_binding.prefix_mismatch_behavior.

Diagram comparing requests that return a 400 error in the Claude Haiku 5.5 API with the fixed requests

How to remove temperature, top_p, and top_k

The migration guide tells you to drop all three parameters on Haiku 5.5 and steer the response style with your prompt. If you do use temperature, the value must be 1, and top_p must be the default 0.99. Code that passed a value other than 1, such as temperature: 0, should not have the value changed. Delete the line instead.

Replace budget_tokens with adaptive thinking

A request that set the thinking budget by hand on Haiku 4.5 should be changed as shown below.

Diagram of the steps to replace budget_tokens with adaptive thinking and the effort setting in the Claude Haiku 5.5 API
{
  "model": "claude-haiku-5-5",
  "max_tokens": 16000,
  "thinking": { "type": "adaptive" },
  "output_config": { "effort": "medium" },
  "messages": [{ "role": "user", "content": "..." }]
}

Adaptive thinking is on by default, so a response can start with a thinking block even if you do not set thinking. If you used a small budget to save thinking tokens, lower the effort instead. At lower levels, the model may skip thinking on simple requests.

Three behaviors change here.

  • Code that reads the first content block as the answer must be fixed to pick the block whose type is text.
  • Thinking tokens count toward max_tokens. If the value is small, the response can stop right after thinking with stop_reason: "max_tokens" and arrive with an empty body.
  • The thinking field of a thinking block is empty by default, and only the signature is returned. If you need the summary text, add "display": "summarized".

Replace the assistant prefill

Prefill means placing an assistant turn at the end of messages so the model continues from it. Haiku 4.5 accepted it with thinking off, but 5.5 returns a 400. Replace it as follows, depending on what you used it for.

What the prefill was used forReplacement
Locking the output format (JSON, etc.)Structured outputs, or a tool with an enum field for classification
Removing a preamble sentenceTell the model in the system prompt to answer directly
Continuing a cut-off responsePut "Your previous response ended with ... and was interrupted. Continue from there." in the user message
Reminding the model of contextPut it in the user turn

Structured outputs for Haiku 5.5 are not available on Amazon Bedrock. In that case, describe the format in the prompt or use a tool without strict, and validate the result in your code.

What changes in token counts and pricing

Haiku 5.5 uses the same new tokenizer as models from 4.7 onward. The same text counts as about 30% more tokens than on Haiku 4.5, so you need to recount max_tokens and your cost estimates on the new model. Images use a high-resolution tier that is not downscaled until the long edge reaches 2,576 pixels, so a 2,000×1,500 pixel image costs about 2.5 times more vision tokens. Thinking blocks from earlier turns also stay in your input tokens.

According to the Anthropic pricing page, Haiku 5.5 costs $0.10 per million input tokens and $0.50 per million output tokens. Requests with a prompt over 100,000 tokens rise to $0.50 for input and $2.50 for output. Haiku 4.5 costs $1 for input and $5 for output.

Output token price for Haiku 4.5 and 5.5 (USD per million tokens)
ModelOutput price
Haiku 4.55
Haiku 5.5 (up to 100,000 tokens)0.5
Haiku 5.5 (over 100,000 tokens)2.5

The unit prices are lower, but token counts rise by 30% and long prompts have their own price tier. Recalculate your real bill using tokens counted on the new model. Organizations that contracted Priority Tier for Haiku 4.5 should plan capacity separately, because Haiku 5.5 does not support it.

How to check that the fix works

After changing the model ID to claude-haiku-5-5, send one real request and confirm you get HTTP 200. Check that the answer is in the block whose type is text in the response content, and that stop_reason is not max_tokens. If stop_reason is refusal, the Haiku 5.5 safety classifier declined the request. There is no server-side fallback model, so your code must handle it. If you have a lot of code, you can run /claude-api migrate this project to claude-haiku-5-5 in Claude Code to swap the model ID and fix the parameters in one pass.

Checklist for confirming HTTP 200 and the response blocks after fixing the Claude Haiku 5.5 API 400 error

Frequently asked questions

Does Haiku 5.5 return an error if I set temperature to 1?

No. 1 is an allowed value, and any other value returns a 400. Still, the official guidance is to omit all three parameters.

How long can I keep using Haiku 4.5?

Check the retirement schedule on Anthropic's model deprecations page.

Do I need to change my code if I use Managed Agents?

If you use Claude Managed Agents, you only need to change the model name. The changes above apply to code that calls the Messages API directly.

Found this useful? Share it

Latest posts

Related projects

Get new posts by email

Insights on marketing, analytics, and dev, delivered to your inbox.