Skip to main content

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

1

Fetch your content

Pull the article from your CMS, a URL, or a local file.
# 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
2

Generate a video prompt with an LLM

The LLM acts as a producer — extracting the most engaging points and structuring them for video.
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
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.
3

Generate the video

Submit the prompt. Attach any images or charts from the article as file inputs.
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.
4

Generate multiple formats

One article can become multiple videos for different platforms:
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"])

Content Types That Convert Well

Content typeVideo styleTips
How-to articlesTutorial walkthroughStep-by-step with text overlays
ListiclesQuick tipsOne point every 5–7 seconds, great for short-form
Opinion/analysisThought leadershipPresenter-driven, conversational
Case studiesStory-drivenBefore/after structure, stats as highlights
NewslettersWeekly digestCover 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 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 for global audiences
  • Podcast-to-video: Extract audio highlights → write visual prompt → avatar presents the key takeaways

Next Steps

Social Media Pipeline

Generate original social content, not just repurposed articles.

Automated Broadcast

Automate the entire content → video → distribute pipeline.