Read through this guide to set up Replicate & get familiar with how it is used
across the different apps.
Set up Replicate
First, create a Replicate account or sign in. Next, navigate to the API key page and “Create token”. Make sure to save this somewhere safe and do not share it with anyone. Once you have your API key, paste it in your .env file:Apps Using Replicate
Replicate is primarily used for async media generation tasks including video generation and image generation.Video Studio
Generate videos using async generation with progress tracking via Replicate
Image Studio
Generate images using Flux and other models available through Replicate
Features
- Async generation — Video and image generation tasks are submitted to Replicate and processed asynchronously with progress tracking.
- Video Studio — Generate AI videos using state-of-the-art models available on Replicate.
- Image Studio — Access image generation models like Flux through the Replicate API.
- Uploads generated media to cloud storage.
- Stores generation data in the ‘generations’ table in Supabase.
- Reduces user’s credits (configurable in
toolConfig.ts) per generation.
Structure
Replicate is used for async media generation workflows. Unlike the chat-based providers that use the Vercel AI SDK model registry, Replicate handles long-running generation tasks with progress tracking. The typical flow for a generation request:- The user submits a prompt and configuration from the front-end
- The request is sent to Replicate to start async generation
- Progress is tracked and reported back to the user
- Once complete, the generated media (video or image) is retrieved
- The media is uploaded to cloud storage
- Results are stored in Supabase
Structure
Understand the project structure of the codebase

