> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mixroute.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude Sonnet 5.5

> Claude Sonnet 5.5 for coding, knowledge work, and tool workflows, with model-specific thinking and migration settings.

Claude Sonnet 5.5 balances response speed and reasoning capability for coding, knowledge work, and multistep tool workflows. Use the exact MixRoute ID `claude-sonnet-5-5`.

## Model Information

| Field | Description |
| - | - |
| `model` | claude-sonnet-5-5 |
| `context` | 1M tokens |
| `max output` | 128K tokens |
| `input / output` | Text and images in; text and tool-use blocks out. |

These are model specifications. Actual limits, pricing, and hosted-tool availability depend on your account and route. Prefer the native Messages API for Claude-specific settings.

## Messages API

```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/messages" \
  --header "Authorization: Bearer $MIXROUTE_API_KEY" \
  --header "Content-Type: application/json" \
  --header "anthropic-version: 2023-06-01" \
  --data '{
  "model": "claude-sonnet-5-5",
  "max_tokens": 1024,
  "output_config": {
    "effort": "low"
  },
  "messages": [
    {
      "role": "user",
      "content": "Explain the tradeoffs of database indexes."
    }
  ]
}'
```

| Field | Description |
| - | - |
| `model` | Required: claude-sonnet-5-5. |
| `max_tokens` | Required output budget, including thinking and visible text. |
| `messages` | Required conversation messages. A top-level system field carries system instructions. |
| `output_config.effort` | low, medium, high, xhigh, or max; default high. |
| `thinking.type` | adaptive (default) or between\_tools. Legacy enabled/disabled values are not supported. |
| `thinking.display` | For adaptive thinking, omitted is the default; summarized returns readable summaries. Do not send this field with between\_tools. |
| `tools` | Claude tools with name, description, and input\_schema. Strict tool support depends on the upstream platform. |
| `tool_choice` | Use `{"type":"auto"}`. Forced types any and tool are not supported. |
| `stream` | true enables native Messages SSE events. |

## Thinking Settings

Omitting `thinking` enables adaptive thinking. To turn off thinking before the initial response, use `thinking: {"type":"between_tools"}` with `low`, `medium`, or `high` effort. Inter-tool progress updates may still appear as thinking blocks; this is not a promise of zero thinking throughout a tool workflow.

```json theme={null}
{
  "thinking": {
    "type": "between_tools"
  },
  "output_config": {
    "effort": "low"
  }
}
```

Do not combine `between_tools` with `xhigh`/`max`, `display`, `budget_tokens`, or `block_binding`. Use adaptive thinking for the two highest effort levels. Omit non-default sampling settings (`temperature`, `top_p`, `top_k`) and legacy manual thinking budgets.

## Tool Use and Responses

```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/messages" \
  --header "Authorization: Bearer $MIXROUTE_API_KEY" \
  --header "Content-Type: application/json" \
  --header "anthropic-version: 2023-06-01" \
  --data '{
  "model": "claude-sonnet-5-5",
  "max_tokens": 1024,
  "output_config": {
    "effort": "low"
  },
  "messages": [
    {
      "role": "user",
      "content": "Call lookup_status for service demo, then report the returned status."
    }
  ],
  "tools": [
    {
      "name": "lookup_status",
      "description": "Return the status of a named service.",
      "input_schema": {
        "type": "object",
        "properties": {
          "service": {
            "type": "string"
          }
        },
        "required": [
          "service"
        ],
        "additionalProperties": false
      },
      "strict": true
    }
  ],
  "tool_choice": {
    "type": "auto"
  }
}'
```

With auto selection, the model may either call a tool or answer directly. State when a tool is needed in the prompt. If strict tools are unavailable on the selected route, omit strict and validate the returned input in your application.

When `stop_reason` is `tool_use`, handle every `tool_use` block, then send a user `tool_result` block with the matching `tool_use_id`. Append the complete assistant content array unchanged, including empty thinking blocks and their signatures. Do not reuse thinking blocks with another model or an unrelated conversation.

Thinking text is omitted by default, so a content array can contain an empty thinking block before text. Read blocks by type instead of assuming content\[0] is text:

```python theme={null}
for block in response.json().get("content", []):
    if block.get("type") == "text":
        print(block["text"])
```

## OpenAI-Compatible Chat

```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/chat/completions" \
  --header "Authorization: Bearer $MIXROUTE_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "claude-sonnet-5-5",
  "max_tokens": 1024,
  "messages": [
    {
      "role": "user",
      "content": "Explain the tradeoffs of database indexes."
    }
  ]
}'
```

Read text from `choices[0].message.content`. Do not assume Claude-specific thinking settings map to identically named Chat Completions fields; use Messages when those controls are needed.

## Migrating from Sonnet 5

1. Use `claude-sonnet-5-5` without a date suffix.
2. Replace disabled thinking with between\_tools at high effort or below.
3. Replace forced tool selection with auto; keep thinking blocks and signatures intact.
4. Remove assistant prefills, manual thinking budgets, and non-default sampling settings.
5. Re-evaluate token budgets and effort levels; hosted computer-use/advisor tools have separate platform-specific compatibility requirements.

[Messages API](/en/api-reference/endpoint/messages) | [Chat Completions API](/en/api-reference/endpoint/chat-openai)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.