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

# Anthropic Messages 接口

> 原生兼容 Anthropic Claude Messages 格式

### 请求参数

<ParamField header="x-api-key" type="string" required>
  传入您的 SocialVision API 密钥（格式如 `sk-sv-...`）。
</ParamField>

<ParamField header="anthropic-version" type="string" default="2023-06-01">
  Anthropic 协议版本号。
</ParamField>

<ParamField body="model" type="string" required>
  模型标识符，例如 `claude-3-7-sonnet-20250219` 或 `claude-3-5-sonnet-20241022`。
</ParamField>

<ParamField body="messages" type="array" required>
  消息列表。
</ParamField>

<ParamField body="max_tokens" type="integer" required>
  最大回复 token 数。
</ParamField>

***

### 请求示例

```bash theme={null}
curl https://api.socialvision.tisyk.xyz/v1/messages \
  -H "Content-Type: application/json" \
  -H "x-api-key: sk-sv-YOUR_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -d '{
    "model": "claude-3-7-sonnet-20250219",
    "max_tokens": 1024,
    "messages": [
      {"role": "user", "content": "Hello Claude!"}
    ]
  }'
```
