Skip to main content
Replicate is your go-to for file-heavy AI workflows in this repo — image generation, video generation, and audio transcription. Unlike the chat providers that stream text, Replicate handles longer-running jobs and model-specific workflows cleanly.

Get your API key

1

Create or sign into your Replicate account

Head to Replicate and sign up or log in.
2

Generate an API token

Go to the API tokens page and click Create token.
3

Add it to your env

Paste the token in your .env.local file:
REPLICATE_API_TOKEN=your_replicate_api_key
Save your API token somewhere safe right away. You won’t be able to see it again after creation.

Apps using Replicate

Replicate powers several of the media and file-processing flows in the app.

Video Studio

Generate AI videos with progress tracking via Replicate

Image Studio

Generate images using Flux and other models on Replicate

Audio

Transcribe recordings with Replicate Whisper

Features

Here’s what Replicate brings to the table:
  • Async generation — long-running media tasks are submitted and processed with progress tracking
  • Video Studio — all shipped video models currently route through the Replicate integration
  • Image Studio — access image generation models like Flux
  • Audio — run Whisper transcription on uploaded recordings
  • Cloud storage — generated media is automatically uploaded to cloud storage
  • Database tracking — generation data is stored in the generations table in PostgreSQL
  • Credit usage — each generation reduces the user’s credits (configurable in toolConfig.ts)

How it works

Unlike chat providers that use the shared text-model registry, Replicate handles media generation and transcription workflows through dedicated integrations. Here’s the typical flow for a generation request:
  1. You submit a prompt and configuration from the front-end
  2. The request is sent to Replicate to start async generation
  3. Progress is tracked and reported back in real-time
  4. Once complete, the generated media or transcript is retrieved
  5. The media is uploaded to cloud storage
  6. Results are stored in PostgreSQL
The key difference from chat providers: Replicate tasks can take seconds to minutes, so everything runs asynchronously with progress updates instead of token-by-token streaming.

Structure

Understand the full project structure of the codebase.