> ## Documentation Index
> Fetch the complete documentation index at: https://heygen-1fa696a7.mintlify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Content Repurposing

> Repurpose blog posts, podcasts, and long-form video into avatar-led short clips with the HeyGen API. One source, dozens of platform-ready outputs.

## The Problem

You invest hours writing a great blog post. It reaches your readers — but misses the much larger audience that consumes content through video. Manually converting articles to video takes almost as long as writing them.

## How It Works

```
Written content → LLM extracts key points → Video Agent renders → Distribute on video platforms
```

An LLM reads your content and writes a production-quality video prompt — extracting the most compelling points and restructuring them for video. The same article can become a 90-second YouTube explainer, a 30-second TikTok, and a 60-second LinkedIn post.

## Build It

<Steps>
  <Step title="Fetch your content">
    Pull the article from your CMS, a URL, or a local file.

    ```python theme={null}
    # From a file
    with open("article.md") as f:
        article = f.read()

    # Or from a URL (use a proper extraction library for production)
    import requests
    article = requests.get("https://yourblog.com/posts/your-article").text
    ```
  </Step>

  <Step title="Generate a video prompt with an LLM">
    The LLM acts as a producer — extracting the most engaging points and structuring them for video.

    ```python theme={null}
    import anthropic

    client = anthropic.Anthropic()

    message = client.messages.create(
        model="claude-sonnet-4-20250514",
        max_tokens=1024,
        messages=[{
            "role": "user",
            "content": f"""You are a video producer converting a written article
    into a HeyGen Video Agent prompt.

    Read this article and create a 60-second video prompt that:
    1. Opens with the most compelling insight or stat (hook)
    2. Covers the 3 most important points — not everything, the best bits
    3. Uses specific visual descriptions — what the viewer sees on screen
    4. Ends with a CTA to read the full article
    5. Matches the tone of the original

    Article:
    {article}

    Output ONLY the Video Agent prompt."""
        }],
    )
    video_prompt = message.content[0].text
    ```

    <Info>
      **Don't summarize — adapt.** The LLM shouldn't just compress the article. It should identify the most *visual* and *engaging* points and restructure them for video. A great blog point might be boring on video, and vice versa.
    </Info>
  </Step>

  <Step title="Generate the video">
    Submit the prompt. Attach any images or charts from the article as file inputs.

    ```python theme={null}
    resp = requests.post(
        "https://api.heygen.com/v3/video-agents",
        headers={
            "X-Api-Key": HEYGEN_API_KEY,
            "Content-Type": "application/json",
        },
        json={
            "prompt": video_prompt,
            "files": [
                {"type": "url", "url": "https://yourblog.com/images/chart.png"},
            ],
        },
    )
    video_id = resp.json()["data"]["video_id"]
    ```

    Then poll for completion — see [Video Agent docs](/docs/video-agent).
  </Step>

  <Step title="Generate multiple formats">
    One article can become multiple videos for different platforms:

    ```python theme={null}
    formats = [
        {"platform": "YouTube", "duration": "90s", "orientation": "landscape", "style": "in-depth"},
        {"platform": "TikTok/Reels", "duration": "30s", "orientation": "portrait", "style": "hook-driven"},
        {"platform": "LinkedIn", "duration": "60s", "orientation": "landscape", "style": "professional"},
    ]

    for fmt in formats:
        # Regenerate the LLM prompt with platform-specific instructions
        platform_prompt = generate_prompt_for(article, fmt)
        # Submit to Video Agent with the right orientation
        submit_video(platform_prompt, orientation=fmt["orientation"])
    ```
  </Step>
</Steps>

## Content Types That Convert Well

| Content type         | Video style          | Tips                                              |
| -------------------- | -------------------- | ------------------------------------------------- |
| **How-to articles**  | Tutorial walkthrough | Step-by-step with text overlays                   |
| **Listicles**        | Quick tips           | One point every 5–7 seconds, great for short-form |
| **Opinion/analysis** | Thought leadership   | Presenter-driven, conversational                  |
| **Case studies**     | Story-driven         | Before/after structure, stats as highlights       |
| **Newsletters**      | Weekly digest        | Cover 3–5 highlights, keep it breezy              |

## Automating the Pipeline

```
Blog CMS webhook → "New post published"
       ↓
  Fetch article content
       ↓
  LLM generates video prompt
       ↓
  Video Agent renders
       ↓
  Upload to YouTube / post to social
       ↓
  Add video embed to original article
```

Trigger from a CMS webhook, cron job, or CI/CD. See [Automated Broadcast](/cookbook/video-agent/automated-broadcast) for scheduling and distribution patterns.

## Variations

* **Teaser + full:** 15-second teaser for social, 90-second deep dive for YouTube
* **Multi-language:** Generate in English, then [translate](/cookbook/video-agent/multilingual-content) for global audiences
* **Podcast-to-video:** Extract audio highlights → write visual prompt → avatar presents the key takeaways

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Social Media Pipeline" icon="share-nodes" href="/cookbook/video-agent/social-media-pipeline">
    Generate original social content, not just repurposed articles.
  </Card>

  <Card title="Automated Broadcast" icon="tower-broadcast" href="/cookbook/video-agent/automated-broadcast">
    Automate the entire content → video → distribute pipeline.
  </Card>
</CardGroup>
