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

# Claude 视频生成示例

> Claude 官方视频能力边界与推荐工作流。

## 官方能力边界

* Anthropic 当前公开 API 没有独立的视频生成 endpoint
* Claude 更适合处理视频摘要、镜头分析或字幕理解这类“视频理解”工作

## 推荐工作流

1. 如需生成视频，路由到 [OpenAI 视频](/api-reference/endpoints/openai/video) 或 [Gemini 长任务视频](/api-reference/endpoints/gemini/video-predict-long-running)
2. 如需理解视频，先抽帧或转写，再交给 [Claude /v1/messages](/api-reference/endpoints/claude/video)
3. 让 Claude 负责脚本润色、镜头分析或结果总结

## 最小请求

```json theme={null}
{
  "model": "claude-sonnet-4-20250514",
  "max_tokens": 800,
  "system": "You turn product briefs into short video storyboards.",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "把 ApiGo 的产品卖点整理成 8 秒视频分镜，适合后续交给视频生成模型。"
        }
      ]
    }
  ]
}
```

## cURL 示例

```bash theme={null}
curl https://api.anthropic.com/v1/messages \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-sonnet-4-20250514",
    "max_tokens": 800,
    "system": "You turn product briefs into short video storyboards.",
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "把 ApiGo 的产品卖点整理成 8 秒视频分镜，适合后续交给视频生成模型。"
          }
        ]
      }
    ]
  }'
```

## Python 示例

```python theme={null}
from anthropic import Anthropic

client = Anthropic(api_key="<ANTHROPIC_API_KEY>")

response = client.messages.create(
    model="claude-sonnet-4-20250514",
    max_tokens=800,
    system="You turn product briefs into short video storyboards.",
    messages=[
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "把 ApiGo 的产品卖点整理成 8 秒视频分镜，适合后续交给视频生成模型。",
                }
            ],
        }
    ],
)

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

## Node.js 示例

```js theme={null}
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  apiKey: process.env.ANTHROPIC_API_KEY,
});

const response = await client.messages.create({
  model: "claude-sonnet-4-20250514",
  max_tokens: 800,
  system: "You turn product briefs into short video storyboards.",
  messages: [
    {
      role: "user",
      content: [
        {
          type: "text",
          text: "把 ApiGo 的产品卖点整理成 8 秒视频分镜，适合后续交给视频生成模型。"
        }
      ]
    }
  ]
});

console.log(response.content[0].text);
```

## 最佳实践

* 生成和理解是两条完全不同的链路，不要混成一个 endpoint
* 预处理步骤要显式保存中间产物，便于复现
* Claude 更适合做脚本和分析，不适合伪装成视频生成器
