The Architectural Shift from Pixel Diffusion to Code-Based Video
Generative video has traditionally relied on diffusion and autoregressive transformer models operating directly in pixel or latent space (such as Runway, Sora, and Kling). While these visual models generate photorealistic textures and complex organic dynamics, they introduce severe liabilities for enterprise engineering teams, marketing developers, and UI/UX designers:
- Text Hallucination and Layout Drifts: Direct pixel generation frequently garbles typography, distorts brand logos, and fails to maintain rigid alignment with design systems.
- Non-Deterministic Iterations: Tweaking a single phrase, color gradient, or timing parameter in a diffusion video requires re-generating the entire video from scratch, resulting in unpredictability and high render costs.
- Absence of Layered Assets and Modularity: Pixel-space video outputs cannot be decomposed into reusable DOM layers, vector elements, or programmatic animation timelines.
- Prohibitive Cloud Compute Costs: Multi-second high-resolution video diffusion pipelines require heavy GPU clusters, making real-time, personalized video generation at scale cost-prohibitive for high-throughput SaaS platforms.
To eliminate these structural constraints, the industry is transitioning toward Code-to-Video generation. By instructing frontier large language models to write structured, declarative code—specifically HyperFrames HTML combining native HTML/CSS layouts with the GreenSock Animation Platform (GSAP)—systems can programmatically synthesize video compositions that render deterministically at 60 frames per second.
To measure model competence in this new domain, Artificial Analysis launched Code2Video-AA, an independent implementation and evaluation based on HeyGen's Code2Video Bench.
What Is Code2Video-AA?
Code2Video-AA is a rigorous, vendor-independent benchmark created by Artificial Analysis that evaluates how effectively 27 frontier AI models turn natural language design briefs into programmatic, animated product and brand videos.
Rather than synthesizing raw MP4 frames directly, each model receives a marketing brief and outputs a single executable file: index.html. This file leverages standard HTML for layout, responsive CSS, and GSAP JavaScript timelines for fluid motion design. The resulting code is subsequently compiled and rendered into a video using the open-source HyperFrames headless rendering engine.

Key Findings from the Code2Video-AA Leaderboard
- Claude Opus 5.5 Leads Across All Axes: Anchoring GPT-5.5 at an Elo rating of 1000, Anthropic's Claude Opus 5.5 (max with fallback) dominates the benchmark at 1536 Elo, leading the runner-up by 93 Elo points and capturing first place across all five judging criteria.
- Statistical Tie for Second Place: Claude Sonnet 5.5 (1443 Elo) and OpenAI's GPT-6 Astra (1427 Elo) perform within the margin of error of one another, forming the second tier of programmatic video authoring.
- Cost Disparity Exceeds 300X: Across the 27 evaluated models, cost-per-task spans from $0.01 to $3.89. GPT-6.1 Sol (4th place at 1369 Elo) averages approximately $0.31 per task—roughly one-tenth the cost of Claude Opus 5.5 ($3.08)—representing an attractive cost-to-performance ratio for automated pipelines.
- Open-Weights Models Face a 480+ Elo Gap: Leading open-weights models—such as DeepSeek V4.1 Flash (1053 Elo) and MiMo-V2.6 series (1052 Elo)—trail frontier proprietary models by more than 480 Elo points, primarily struggling with nested GSAP animation choreography and complex typography hierarchy.
- Exceptional Code Compilation Rates: 98.8% of all submitted compositions (3,042 out of 3,078 tasks) rendered successfully into valid video files without runtime syntax errors, with eight models achieving a 100% completion rate across all 114 briefs.
The Five Core Evaluation Axes
To score generated videos without human bias, Artificial Analysis runs automated head-to-head pairwise comparisons using multimodal AI judges evaluated across five specific dimensions:
- Craft (128-Point Lead by Opus 5.5): Measures technical animation execution, easing curves, motion velocity, visual cleanliness, and lack of visual stuttering. This axis produced the single largest performance separation between models.
- Prompt Intent: Verifies strict compliance with the brief's directives, including primary call-to-actions (CTAs), specific color palettes, product taglines, and scene sequencing.
- Composition: Audits visual hierarchy, kerning, spatial distribution, whitespace balance, and padding between interface elements and background panels.
- Temporal Consistency: Assesses pacing, transition transitions between scenes, and duration management. This axis exhibited the lowest variance across models, demonstrating that most modern LLMs can handle basic linear timelines.
- Engagement: Evaluates the overall promotional appeal, narrative rhythm, and visual dynamism of the final marketing asset.
HyperFrames & GSAP: Under the Hood
The benchmark mandates that models write self-contained index.html compositions compatible with the HyperFrames execution runner. The standard pattern involves defining DOM containers with responsive layout coordinates and orchestrating motion using GSAP timelines.
The following code demonstrates a representative HyperFrames HTML output structure that a top-performing model generates when tasked with a 5-second product feature reveal:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=1920, height=1080">
<title>HyperFrames Video Composition</title>
<!-- Native GSAP CDN Injection -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.5/gsap.min.js"></script>
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
width: 1920px;
height: 1080px;
background: #0A0F1D;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
color: #F8FAFC;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
}
.scene-container {
position: relative;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.brand-badge {
font-size: 24px;
letter-spacing: 4px;
text-transform: uppercase;
color: #38BDF8;
margin-bottom: 24px;
opacity: 0;
transform: translateY(-20px);
}
.headline {
font-size: 72px;
font-weight: 800;
line-height: 1.1;
text-align: center;
max-width: 1200px;
opacity: 0;
transform: scale(0.9);
}
.cta-card {
margin-top: 48px;
padding: 16px 36px;
background: #022C22;
border: 2px solid #10B981;
border-radius: 9999px;
font-size: 28px;
font-weight: 600;
color: #10B981;
opacity: 0;
transform: translateY(30px);
}
</style>
</head>
<body>
<div class="scene-container">
<div class="brand-badge" id="brand">HyperScale Analytics</div>
<h1 class="headline" id="title">Real-Time Telemetry at Single-Digit Latency</h1>
<div class="cta-card" id="cta">Deploy Cluster Today</div>
</div>
<script>
// Initialize Master GSAP Timeline synchronized to HyperFrames timecode
const masterTimeline = gsap.timeline({ paused: true });
// Scene 1: Coordinated Staggered Reveal
masterTimeline
.to("#brand", {
duration: 0.8,
opacity: 1,
y: 0,
ease: "power3.out"
})
.to("#title", {
duration: 1.0,
opacity: 1,
scale: 1,
ease: "back.out(1.7)"
}, "-=0.4")
.to("#cta", {
duration: 0.8,
opacity: 1,
y: 0,
ease: "power2.out"
}, "-=0.3");
// HyperFrames exposes window.seekToTime(seconds) for frame-accurate rendering
window.seekToTime = function(timeInSeconds) {
masterTimeline.seek(timeInSeconds);
};
// Auto-play for interactive browser review
masterTimeline.play();
</script>
</body>
</html>
Architectural Comparison Matrix: Frontier Models on Code2Video-AA
| Model Candidate | Code2Video Elo | Best Performing Axis | Tokens / Task | Cost / Task (USD) | Render Rate |
| Claude Opus 5.5 | 1536 | Craft (1st) | ~176,000 | $3.08 | 100% |
| Claude Sonnet 5.5 | 1443 | Composition (2nd) | ~152,000 | $1.78 | 100% |
| GPT-6 Astra | 1427 | Prompt Intent (2nd) | ~44,000 | $1.62 | 99.1% |
| GPT-6.1 Sol | 1369 | Pacing (4th) | ~38,000 | $0.31 | 100% |
| Gemini 4 Argon | 1285 | Temporal Consistency | ~48,000 | $0.27 | 98.2% |
| DeepSeek V4.1 Flash | 1053 | Prompt Intent | ~32,000 | $0.08 | 97.4% |
| GPT-5.5 (Baseline) | 1000 | Reference Anchor | ~34,000 | $0.82 | 96.5% |
SRE and Production Engineering Best Practices
- Enforce Deterministic Timecode Seeking: When orchestrating headless Chromium instances via Puppeteer or Playwright to capture video frames, bind execution to timeline.seek(t) rather than relying on real-time screen recordings (requestAnimationFrame). This prevents dropped frames if server CPU loads spike during background batch exports.
- Implement AST and Syntax Guardrails: Before routing model outputs to a browser renderer, parse the returned HTML and JavaScript with an Abstract Syntax Tree (AST) validator. Catch missing CDN script imports, unclosed tags, or unhandled exceptions before passing the file to the render pipeline.
- Optimize Token Cost with Two-Tier Architectures: For consumer-facing applications, use a two-step generation strategy: prompt an economical model (e.g., GPT-6.1 Sol or DeepSeek V4.1) to generate the baseline layout and animation structure, then invoke a frontier reasoning model (Claude Sonnet 5.5 or Opus 5.5) solely for a targeted "polish pass" over GSAP easing curves and spatial typography.
- Cache Base HTML Scaffolding: Reduce input token consumption and model latency by supplying the basic CSS reset, font imports, and GSAP boilerplate as static system instructions, allowing the LLM to focus strictly on authoring scene elements and timeline intervals.
Getting Started
To test and render a code-to-video workflow locally using the open-source HyperFrames pipeline:
# Step 1: Clone the official HyperFrames rendering toolchain
git clone https://github.com/heygen/hyperframes.git
cd hyperframes
# Step 2: Install dependencies
npm install
# Step 3: Place your generated index.html into the workspace
# [Paste the HyperFrames HTML template from the section above into index.html]
# Step 4: Render the composition to a high-definition 60fps MP4 video
npx hyperframes render \
--input index.html \
--output video.mp4 \
--width 1920 \
--height 1080 \
--fps 60 \
--duration 5.0
By transitioning video production workflows from opaque diffusion prompts to verifiable, inspectable code generated by frontier models, engineering organizations achieve exact brand compliance, instantaneous iteration, and deterministically rendered video pipelines.