Skip to content

🎥 Make videos programmatically with React

condense

Jonny Burger5af424d9cb94
diff --git a/packages/create-video/src/templates.ts b/packages/create-video/src/templates.ts
index af98511a86..7b84bd9f0d 100644
--- a/packages/create-video/src/templates.ts
+++ b/packages/create-video/src/templates.ts
@@ -203,13 +203,13 @@ export const FEATURED_TEMPLATES: Template[] = [
showStackblitz: true,
},
{
- homePageLabel: 'Prompt to Motion Graphics',
- shortName: 'Prompt to Motion Graphics (Next.js)',
+ homePageLabel: 'Prompt to Motion Graphics SaaS Starter Kit',
+ shortName: 'Prompt to Motion Graphics SaaS Starter Kit',
org: 'remotion-dev',
- repoName: 'template-prompt-to-motion-graphics',
+ repoName: 'template-prompt-to-motion-graphics-saas',
description: 'SaaS template for AI-powered code generation with Remotion',
longerDescription:
- 'A SaaS template for "Prompt to Motion Graphics" products. Generates Remotion code, streams it to the frontend, and compiles and previews it in the browser.',
+ 'A SaaS template for "Prompt to Motion Graphics" products. Generates Remotion code, streams it to the frontend, and compiles and previews it in the browser. See the <a href="/docs/ai/ai-saas-template">documentation page</a> for more details.',
promoBanner: {
width: 2880,
height: 1512,
diff --git a/packages/docs/docs/ai/ai-saas-template.mdx b/packages/docs/docs/ai/ai-saas-template.mdx
index 5afd8dbf28..b68aa354bc 100644
--- a/packages/docs/docs/ai/ai-saas-template.mdx
+++ b/packages/docs/docs/ai/ai-saas-template.mdx
@@ -1,67 +1,25 @@
---
-image: /generated/articles-docs-ai-saas-template.png
crumb: 'AI'
-title: AI SaaS Template - Prompt to Motion Graphics
-sidebar_label: AI SaaS Template
+title: Prompt to Motion Graphics SaaS Starter Kit
+sidebar_label: Prompt to Motion Graphics SaaS
---
import {Installation} from '../../components/Installation';
-A Next.js starter template for building AI-powered motion graphics products. Users describe an animation in natural language, and the app generates and previews it in real-time.
+We made [a Next.js starter template](https://www.remotion.dev/templates/prompt-to-motion-graphics) for building AI-powered motion graphics products.
+Users describe an animation in natural language, and the app generates and previews it in real-time.
-## How is this different from using Claude Code with Remotion Skills?
-
-The purpose of this template is to help you get started building your own browser-based product in the space of prompting motion graphics using Remotion.
-
-Claude Code in combination with Remotion Skills is targeted at tech-savvy folks for iterating on videos with familiar tooling. For developers, this is super fast to set up - but not everybody is a developer.
-
-This template is a starter kit to build AI products focused on generating Remotion code with LLMs directly within the browser. As this only requires natural language as input and no further technical setup, such products vastly broaden the target group beyond developers.
-
-## What's Included
-
-- **Chat interface** with conversation history for iterative refinement
-- **Live preview** - instant rendering in the Remotion Player
-- **Smart editing** - the LLM decides between targeted edits or full replacement
-- **Input Validation** - prevents end-user misuse
-- **Sanitation** - cleans nondeterministic LLM outputs
-- **Self-correction** - automatically retries on compilation errors
-
-The template can easily be extended by adding more [skills](/docs/ai/skills). It streams [generated code](/docs/ai/generate) and compiles it in the browser using [just-in-time compilation](/docs/ai/dynamic-compilation).
-
-## Usage Tips
-
-### Prompting
-
-- Be specific about colors, timing, and layout
-- Include data directly for charts and visualizations
-- Describe the animation feel ("bouncy spring", "smooth fade", "staggered timing")
-- If you have something specific in mind, attach images to the prompt for reference
-
-### Images
-
-This starter kit does not come with a backend. Therefore, there is an important difference between attaching images to the prompt and mentioning image URLs in the prompt.
-
-- **Attaching images**: The assistant will try to replicate in code whatever you attach to the prompt, for example an abstract spiral.
-- **Providing image URLs**: The assistant will embed the provided image within the animation based on the file URL. For example: _"Create a DVD screensaver animation of this image https://example.com/logo.png"_
-
-### What works well
-
-- Kinetic typography and text animations
-- Data visualizations with animated entrances
-- Chat/messaging UI mockups
-- Social media content (Stories, Reels, TikTok)
+<img src="/img/prompt-to-motion-graphics.png" alt="Prompt to Motion Graphics SaaS Starter Kit" />
## Getting Started
-### Create the project
+Scaffold a new project:
```bash
npx create-video@latest --template prompt-to-motion-graphics
```
-### Configure environment
-
-Create a `.env` file:
+Then create a `.env` file:
```bash title=".env"
OPENAI_API_KEY=sk-...
@@ -71,7 +29,7 @@ REMOTION_AWS_ACCESS_KEY_ID=...
REMOTION_AWS_SECRET_ACCESS_KEY=...
```
-### Start the development server
+Start the development server:
```bash
npm run dev
@@ -79,14 +37,29 @@ npm run dev
Visit `http://localhost:3000` to start generating animations.
-## Commands
+## How is this different from Remotion Agent Skills?
+
+Use this template if you want to build a SaaS with Remotion and AI.
+Use [Agent Skills](/docs/ai/claude-code) if you want to prompt videos for yourself.
+
+## What's Included
-| Command | Description |
-| ---------------------- | -------------------- |
-| `npm install` | Install dependencies |
-| `npm run dev` | Start preview |
-| `npx remotion render` | Render video |
-| `npx remotion upgrade` | Upgrade Remotion |
+- Chat interface with conversation history for iterative refinement
+- Live preview - instant rendering in the Remotion Player
+- Smart editing - the LLM decides between targeted edits or full replacement
+- Input Validation - prevents end-user misuse
+- Sanitation - cleans nondeterministic LLM outputs
+- Self-correction - automatically retries on compilation errors
+
+It streams [generated code](/docs/ai/generate) and compiles it in the browser using [just-in-time compilation](/docs/ai/dynamic-compilation).
+
+## Images
+
+This starter kit does not come with a backend.
+Therefore, there is an important difference between attaching images to the prompt and mentioning image URLs in the prompt.
+
+- **Attaching images**: The assistant will try to replicate in code whatever you attach to the prompt, for example an abstract spiral.
+- **Providing image URLs**: The assistant will embed the provided image within the animation based on the file URL. For example: _"Create a DVD screensaver animation of this image https://example.com/logo.png"_
## Lambda Rendering
diff --git a/packages/docs/docs/ai/generate.mdx b/packages/docs/docs/ai/generate.mdx
index 147faf0a35..7dd14e4b61 100644
--- a/packages/docs/docs/ai/generate.mdx
+++ b/packages/docs/docs/ai/generate.mdx
@@ -54,7 +54,7 @@ export const MyComposition: React.FC = () => {
```
Note that the raw output often includes markdown code fences (like ` ```jsx `), which requires additional prompting or sanitation to remove.
-For an example implementation of postprocessing, see the [Prompt to Motion Graphics template](https://github.com/remotion-dev/remotion/blob/main/packages/template-prompt-to-motion-graphics/src/components/PromptInput.tsx#L159).
+For an example implementation of postprocessing, see the [Prompt to Motion Graphics template](https://github.com/remotion-dev/remotion/blob/main/packages/template-prompt-to-motion-graphics-saas/src/components/PromptInput.tsx#L159).
## Structured Output with Zod
@@ -159,7 +159,7 @@ const {output} = await generateText({
});
```
-See the [Prompt to Motion Graphics template](https://github.com/remotion-dev/remotion/tree/main/packages/template-prompt-to-motion-graphics) for a complete example implementation.
+See the [Prompt to Motion Graphics template](https://github.com/remotion-dev/remotion/tree/main/packages/template-prompt-to-motion-graphics-saas) for a complete example implementation.
## Next Steps