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

# Anthropic 格式

> 使用 Anthropic 原生格式调用 Claude 模型

## 说明

如果您使用 Anthropic 官方 SDK，可以直接将 `base_url` 改为 QClaw Router 地址，无需修改其他代码。

## 请求示例

```python Python theme={null}
import anthropic

client = anthropic.Anthropic(
    base_url="https://api.qclawrouter.com",
    api_key="sk-your-api-key"
)

message = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    messages=[
        {"role": "user", "content": "Hello!"}
    ]
)

print(message.content[0].text)
```
