packages/docs/docs/ai/ai-saas-template.mdx
We made 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.
Scaffold a new project:
npx create-video@latest --template prompt-to-motion-graphics
Then create a .env file:
OPENAI_API_KEY=sk-...
Start the development server:
npm run dev
Visit http://localhost:3000 to start generating animations.
Use this template if you want to build a SaaS with Remotion and AI.
Use Agent Skills if you want to prompt videos for yourself.
Unlike the Agent Skills workflow, this template does not have access to an operating system or the filesystem.
It streams generated code and compiles it in the browser using just-in-time compilation.
There is an important difference between attaching images to the prompt and mentioning image URLs in the prompt.
To enable video exporting with Remotion Lambda:
.envOPENAI_API_KEY=sk-...
# Add AWS credentials for Lambda rendering
REMOTION_AWS_ACCESS_KEY_ID=...
REMOTION_AWS_SECRET_ACCESS_KEY=...
npm run deploy.