Ads as Code
An ad-production approach where creative is defined as parameterized code templates and rendered programmatically, rather than built in design tools.
Definition
Ads as code is an approach to ad production in which creative is defined in code — typically as parameterized templates in a programmatic rendering framework such as Remotion (React-based video) — rather than as project files in a design tool. Because each ad is a program that takes data as input, every size, language, hook, and offer version can be rendered automatically, reviewed through version control, and regenerated whenever inputs change. The name parallels infrastructure as code, and the approach has grown with AI-assisted development: code templates are legible to AI agents, which can read, modify, and render them under human review.
Key Points
- 1Creative lives as parameterized code templates in a repository, not as design-tool project files
- 2Variants (sizes, languages, hooks, offers) are render inputs, so full version matrices generate in one batch
- 3Version control gives diffable, reviewable, reproducible creative — the properties infrastructure as code brought to ops
- 4Code templates are operable by AI agents, enabling agentic ad-production workflows with human approval gates
- 5An emerging practice: strongest today in video via frameworks like Remotion, alongside — not replacing — design tools
Examples
A video ad is a React component in Remotion; changing the offer prop and re-rendering updates every placement cut
A pull request updates brand colors in one tokens file and regenerates the whole live creative set consistently
An AI agent drafts three hook variants, edits the template's copy props, and batch-renders them for human review
A seasonal campaign re-renders last quarter's proven template with new product data instead of a new production cycle
How AdSights helps with Ads as Code
The AdSights Ads Framework is a working ads-as-code system: video ad creative is defined as parameterized Remotion templates, a CLI batch-renders every size and variant from data, and bundled Claude Code skills let an AI agent operate the templates — drafting variants, adjusting props, and rendering — under human review. Teams get the properties code brings everywhere else: one source of truth, diffable changes, reproducible outputs, and a production pipeline an agent can actually run.
Want this workflow for your own ad production?
Explore the Ads FrameworkSupplemental Resources
- 📚Remotion — Make Videos Programmatically
The React-based video framework most associated with code-defined video creative
remotion.dev - 📚AdSights Ads Framework
An ads-as-code system: Remotion ad templates, a batch-render CLI, and Claude Code skills that operate them
AdSights Documentation - 📚Agentic Video Ads with Claude Code
A week-by-week walkthrough of running an ads-as-code workflow with an AI agent
AdSights Article
Frequently asked questions
Common questions about Ads as Code, answered.