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

# クロードビデオ生成例

> クロードのビデオ機能の境界と推奨されるワークフロー。

## 公式の能力境界

* Anthropic のパブリック API は専用のビデオ生成エンドポイントを公開していません
* クロードはビデオのレンダリングよりもビデオの理解に適しています。

## 推奨されるワークフロー

1. 実際のビデオ生成を [OpenAI ビデオ](/ja/api-reference/endpoints/openai/video) または [ジェミニのロングランビデオ](/ja/api-reference/endpoints/gemini/video-predict-long-running) にルーティングします。
2. ビデオを理解するために、フレームまたはトランスクリプトを前処理して [クロード /v1/messages](/ja/api-reference/endpoints/claude/video) に送信します。
3. スクリプトの改良、要約、またはシーン分析にクロードを使用する

## 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": 1024,
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "image",
            "source": {
              "type": "url",
              "url": "https://example.com/video-frame-001.png"
            }
          },
          { "type": "text", "text": "Summarize the scene and suggest a stronger video script." }
        ]
      }
    ]
  }'
```

## 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=1024,
    messages=[
        {
            "role": "user",
            "content": [
                {
                    "type": "image",
                    "source": {
                        "type": "url",
                        "url": "https://example.com/video-frame-001.png",
                    },
                },
                {"type": "text", "text": "Summarize the scene and suggest a stronger video script."},
            ],
        }
    ],
)

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: 1024,
  messages: [
    {
      role: "user",
      content: [
        {
          type: "image",
          source: {
            type: "url",
            url: "https://example.com/video-frame-001.png"
          }
        },
        { type: "text", text: "Summarize the scene and suggest a stronger video script." }
      ]
    }
  ]
});

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

## ベストプラクティス

* 生成と理解を別個の製品ワークフローとして維持する
* 再現性を高めるために前処理アーティファクトを保持する
* クロードを、ふりのビデオジェネレーターとしてではなく、分析のために使用する
