> ## 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 4.5

> Claude Sonnet 4.5: general-purpose model for coding and knowledge work. Request examples and parameters for MixRoute.

Claude Sonnet 4.5 is a general-purpose model for coding and knowledge work from Anthropic.

Call `claude-sonnet-4-5-20250929` through MixRoute's Anthropic-compatible Messages API; the OpenAI-compatible Chat Completions API is also supported.

<Warning>
  Anthropic has deprecated Claude Sonnet 4.5 and scheduled its retirement from the Claude API for November 30, 2026. This is the Anthropic-operated API schedule, not a confirmed MixRoute removal date; availability through MixRoute depends on its upstream channels. Plan new integrations and migrations around [Claude Sonnet 5.5](/model-api/anthropic/claude-sonnet-5-5).
</Warning>

## Key capabilities

* Messages API - Native Anthropic request and response format
* OpenAI-compatible - Also works through Chat Completions
* Streaming - Incremental output through SSE
* System prompts - Top-level system instructions
* Tool use - Supports Anthropic tool definitions

## Quick example

### Messages API

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.mixroute.ai/v1/messages" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "anthropic-version: 2023-06-01" \
      -H "Content-Type: application/json" \
      -d '{
      "model": "claude-sonnet-4-5-20250929",
      "max_tokens": 256,
      "messages": [
        {
          "role": "user",
          "content": "Explain quantum entanglement in simple terms."
        }
      ]
    }'
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    from anthropic import Anthropic

    client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")

    message = client.messages.create(
        model="claude-sonnet-4-5-20250929",
        max_tokens=256,
        messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
    )

    print(message.content[0].text)
    ```
  </Tab>

  <Tab title="Streaming">
    ```python theme={null}
    from anthropic import Anthropic

    client = Anthropic(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai")

    with client.messages.stream(
        model="claude-sonnet-4-5-20250929",
        max_tokens=256,
        messages=[{"role": "user", "content": "Write a short poem about the sea."}],
    ) as stream:
        for text in stream.text_stream:
            print(text, end="")
    ```
  </Tab>
</Tabs>

### OpenAI-compatible API

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.mixroute.ai/v1/chat/completions" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
      "model": "claude-sonnet-4-5-20250929",
      "messages": [
        {
          "role": "user",
          "content": "Explain quantum entanglement in simple terms."
        }
      ],
      "max_tokens": 256
    }'
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    from openai import OpenAI

    client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")

    response = client.chat.completions.create(
        model="claude-sonnet-4-5-20250929",
        messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
        max_tokens=256,
    )

    print(response.choices[0].message.content)
    ```
  </Tab>

  <Tab title="Streaming">
    ```python theme={null}
    from openai import OpenAI

    client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")

    stream = client.chat.completions.create(
        model="claude-sonnet-4-5-20250929",
        messages=[{"role": "user", "content": "Write a short poem about the sea."}],
        max_tokens=256,
        stream=True,
    )

    for chunk in stream:
        print(chunk.choices[0].delta.content or "", end="")
    ```
  </Tab>
</Tabs>

## Parameters

### Messages API

| Parameter | Type | Required | Description |
| - | - | - | - |
| `model` | string | Yes | Must be `claude-sonnet-4-5-20250929`. |
| `messages` | array | Yes | Input messages with role and content. |
| `max_tokens` | integer | Yes | Maximum tokens to generate. |
| `system` | string \| array | No | Top-level system instruction. |
| `stream` | boolean | No | Enable SSE streaming. |
| `tools` | array | No | Anthropic tool definitions. |
| `thinking` | object | No | Extended-thinking configuration when supported. |

### OpenAI-compatible API

| Parameter | Type | Required | Description |
| - | - | - | - |
| `model` | string | Yes | Must be `claude-sonnet-4-5-20250929`. |
| `messages` | array | Yes | Conversation messages with role and content. |
| `max_tokens` | integer | No | Maximum generated tokens. |
| `stream` | boolean | No | Enable SSE streaming. Default: false. |
| `temperature` | number | No | Sampling temperature when supported by the model. |
| `top_p` | number | No | Nucleus sampling threshold when supported. |
| `stop` | string \| array | No | Sequences that stop generation. |
| `tools` | array | No | OpenAI-compatible tool definitions. |


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