Skip to main content

Official capability boundary

  • Anthropic’s public API does not expose a dedicated video-generation endpoint
  • Claude is better suited to video understanding than video rendering
  1. Route true video generation to OpenAI video or Gemini long-running video
  2. For video understanding, preprocess frames or transcripts and send them to Claude /v1/messages
  3. Use Claude for script refinement, summarization, or scene analysis

cURL example

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 example

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 example

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);

Best practices

  • Keep generation and understanding as separate product workflows
  • Persist preprocessing artifacts for reproducibility
  • Use Claude for analysis, not as a pretend video generator