> ## 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 Opus 4.8

> Claude Opus 4.8: 高度なコーディング、エージェント、複雑な分析向けのモデル。MixRouteでのリクエスト例とパラメータ。

Claude Opus 4.8は、高度なコーディング、エージェント、複雑な分析に対応するAnthropicのモデルです。

MixRouteのAnthropic互換Messages APIを通じて`claude-opus-4-8`を呼び出してください。OpenAI互換のChat Completions APIもサポートされています。

## 主な機能

* Messages API - Anthropicネイティブのリクエスト・レスポンス形式
* OpenAI互換 - Chat Completions経由でも使用可能
* ストリーミング - SSEによる逐次出力
* システムプロンプト - トップレベルのシステム指示
* ツール利用 - Anthropicのツール定義をサポート

## 簡単な使用例

### 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-opus-4-8",
      "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-opus-4-8",
        max_tokens=256,
        messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
    )

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

  <Tab title="ストリーミング">
    ```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-opus-4-8",
        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互換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-opus-4-8",
      "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-opus-4-8",
        messages=[{"role": "user", "content": "Explain quantum entanglement in simple terms."}],
        max_tokens=256,
    )

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

  <Tab title="ストリーミング">
    ```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-opus-4-8",
        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>

## パラメータ

### Messages API

| パラメーター | 型 | 必須 | 説明 |
| - | - | - | - |
| `model` | string | はい | `claude-opus-4-8`である必要があります。 |
| `messages` | array | はい | roleとcontentを含む入力メッセージ。 |
| `max_tokens` | integer | はい | 生成するトークンの最大数。 |
| `system` | string \| array | いいえ | トップレベルのシステム指示。 |
| `stream` | boolean | いいえ | SSEストリーミングを有効にします。 |
| `tools` | array | いいえ | Anthropicのツール定義。 |
| `thinking` | object | いいえ | 対応している場合の拡張思考の設定。 |

### OpenAI互換API

| パラメーター | 型 | 必須 | 説明 |
| - | - | - | - |
| `model` | string | はい | `claude-opus-4-8`である必要があります。 |
| `messages` | array | はい | roleとcontentを含む会話メッセージ。 |
| `max_tokens` | integer | いいえ | 生成するトークンの最大数。 |
| `stream` | boolean | いいえ | SSEストリーミングを有効にします。デフォルト: false。 |
| `temperature` | number | いいえ | モデルが対応している場合のサンプリング温度。 |
| `top_p` | number | いいえ | 対応している場合のNucleusサンプリングのしきい値。 |
| `stop` | string \| array | いいえ | 生成を停止するシーケンス。 |
| `tools` | array | いいえ | OpenAI互換のツール定義。 |


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