Models & pricing / claude-sonnet-5 · Anthropic
Anthropic

claude-sonnet-5 API

Claude Sonnet 5 is an Anthropic Sonnet version for planning, tool use and sustained execution across coding and knowledge work. It uses adaptive thinking and is now an active legacy model. XiuAI integrations should check parameters, current costs and migration choices.[1][2][4]

claude-sonnet-5

Model overview

Published provider specifications. Available features depend on the current API route.

API routes
OpenAI-compatible API / openai-response / openai-response-compact / Anthropic Messages / Gemini GenerateContent / openai-alpha-search

Planning and follow-through

The release emphasizes execution from planning through tool use and result checks. Consider multi-step coding, synthesis after research or business assistance with explicit completion criteria. Your application provides tools and state; the model does not acquire execution permissions on its own.[2]

When comparing earlier Sonnet versions, examine completion, handling of tool results and whether outputs meet your requirements. Proximity to an Opus model on vendor benchmarks does not establish equal results on every task.[2]

Adaptive thinking and sampling

Sonnet 5 uses effort to steer adaptive thinking. Its current reference states that temperature, top_p or top_k returns a 400 error. Make model-specific choices for older applications’ shared sampling settings rather than assuming one request contract fits every model.[1]

API access

XiuAI integration and migration

Use the exact ID claude-sonnet-5 with message, tool and thinking fields for the current protocol. When preparing to move to 5.5, also check forced tool_choice and older ways of disabling thinking. Compatibility-protocol fields are not automatically identical to native Anthropic fields.[4][3]

Total cost depends on input, output, caching and repeated calls. Launch performance and vendor prices provide version context; use current XiuAI rates and actual request usage for your decision.[2][4]

Send a request using your existing API key.

POST /v1/chat/completions
curl 'https://router-api.xiu.ai/v1/chat/completions' \
  -H "Authorization: Bearer $XIUAI_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "model": "claude-sonnet-5",
  "messages": [
    {
      "role": "user",
      "content": "Hello"
    }
  ]
}'
Read the API documentation

Frequently asked questions

Why does setting temperature produce an error?

Native Sonnet 5 requests do not accept temperature, top_p or top_k. Remove unsupported sampling fields, use effort as documented and check how a compatibility protocol maps parameters.[1][4]

Is Sonnet 5 simply a cheaper Opus?

No. It is a separate model, and launch comparisons used particular tasks and effort settings. Check capabilities, parameters and actual costs independently instead of inheriting every limitation or tool behavior from another model.[2][1]

Why can forced tool calls fail after switching to 5.5?

The 5.5 migration guide identifies forced tool choice as a required change. Check whether your application depends on any or a named tool, then design tool selection and argument validation around the target model’s supported rules.[3]

Related models

claude-sonnet-5-5claude-opus-5-5

Sources and updates

Specifications reference provider documentation; prices and availability come from the current XiuAI catalog.

Content reviewed: 2026-11-16

[1] Claude Sonnet 5 model reference[2] Claude Sonnet 5 announcement[3] Anthropic migration guide[4] Current XiuAI model and pricing dataModel documentationTool callingStructured outputContext documentation