# Ads as Code

**Category:** creative  
**Short Description:** An ad-production approach where creative is defined as parameterized code templates and rendered programmatically, rather than built in design tools.  
**Last Updated:** 2026-07-12T00:00:00Z

## 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.

## 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

## Key Points

- Creative lives as parameterized code templates in a repository, not as design-tool project files
- Variants (sizes, languages, hooks, offers) are render inputs, so full version matrices generate in one batch
- Version control gives diffable, reviewable, reproducible creative — the properties infrastructure as code brought to ops
- Code templates are operable by AI agents, enabling agentic ad-production workflows with human approval gates
- An emerging practice: strongest today in video via frameworks like Remotion, alongside — not replacing — design tools

## How AdSights Helps

**Ads as Code with AdSights:** 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.

[Explore the AdSights Ads Framework](/frameworks/ads-framework)

## FAQs

### What is ads as code?

Ads as code is an ad-production approach where creative is written as parameterized code templates — for example React components rendered to video with Remotion — instead of built as one-off files in a design tool. The template defines the creative's structure and motion; data supplies each variant's copy, media, offer, language, and aspect ratio; and a render step produces the finished files. One source template can output an entire campaign's version matrix on demand.

### How is ads as code different from using templates in a creative management platform?

Both are template-plus-data production, but the medium differs. CMP templates live inside a SaaS editor; code templates live in a repository, which brings software-engineering properties: version control and code review for creative changes, diffable history, deterministic re-renders, arbitrary logic and data integration, and no platform lock-in. The trade-off is that someone must be comfortable maintaining code. CMPs suit no-code teams; ads as code suits teams with engineering capacity — or teams using AI agents to do the code operation for them.

### Why define ad creative in code at all?

For the same reasons infrastructure moved to code: reproducibility, review, and scale. A coded ad template makes every creative decision explicit and versioned — a brand-color change is a one-line diff applied everywhere, a new offer is a data update followed by a re-render, and last quarter's winning ad can be regenerated exactly. Code is also the interface AI agents understand best, so code-defined creative is what makes genuinely agentic ad production workflows possible.

### Is ads as code an established industry term?

It is an emerging term, not yet a standardized industry category — the underlying practice is usually described as programmatic video creation or code-based creative automation. The pattern it names is real and growing: frameworks like Remotion made programmatic video rendering mainstream among developers, and AI coding agents have made operating such templates practical for marketing teams. Treat the term as a useful label for a recognizable approach, borrowed from the infrastructure-as-code naming convention.

### What do you need to adopt ads as code?

Three pieces: a rendering framework (Remotion is the dominant choice for video), templates that encode your brand system and creative concepts as parameterized components, and a render pipeline (a CLI or CI job) that turns data into finished files. Teams without in-house engineering increasingly add a fourth piece — an AI coding agent with the skills to operate the templates — so the human role concentrates on concept, brief, and approval rather than template mechanics.

## Related Terms

### Parent Terms

- **[Creative Automation](/resources/glossary/creative/creative-automation)**: Ads as code is the code-native implementation of creative automation
- **[Programmatic Creative](/resources/glossary/creative/programmatic-creative)**: Ads as code sits on the production side of programmatic creative

### Component Terms

- **[Creative Versioning](/resources/glossary/creative/creative-versioning)**: Versioning becomes a render parameter — the full matrix generates from one source template
- **[Render](/resources/glossary/creative/render)**: The output step: coded templates compute into finished, placement-ready media files

### Similar Terms

- **[Agentic Workflow](/resources/glossary/general/agentic-workflow)**: Code-defined creative is the substrate agentic production workflows operate on

## Related Resources

- [Remotion — Make Videos Programmatically](https://www.remotion.dev/) - The React-based video framework most associated with code-defined video creative
- [AdSights Ads Framework](/frameworks/ads-framework) - An ads-as-code system: Remotion ad templates, a batch-render CLI, and Claude Code skills that operate them
- [Agentic Video Ads with Claude Code](/blog/topics/ad-tech/agentic-video-ads-claude-code-ads-framework) - A week-by-week walkthrough of running an ads-as-code workflow with an AI agent
