Skip to main content
Replicate is a platform for running open-source AI models through a single API. The Replicate connector lets your Lovable app run thousands of models for image, video, audio, and text generation. It’s designed for apps that need a specific or open-source model beyond Lovable’s built-in AI, such as a particular FLUX fine-tune, a community video model, or a specific Whisper variant. With Replicate, your app can:
  • Generate images, video, and audio with thousands of open-source models
  • Run popular models like FLUX, Stable Diffusion, and Whisper
  • Stream long-running predictions or wait synchronously for fast models
  • Train and fine-tune custom models on your own data
Replicate is a good fit when your app needs a specific model that isn’t available through Lovable’s built-in AI.

Common use cases and example apps

Example appExample promptDescription
Text-to-image generatorsUse Replicate and build an app that turns text prompts into images with FLUX.Generate images from text prompts on demand.
The app sends prompts to a Replicate image model and shows the results to the user.
Image-to-video toolsUse Replicate and build a tool that animates a product photo into a short video clip.Turn still images into short video clips.
The app uploads a source image, runs an image-to-video model, and plays back the generated clip.
Audio transcription appsUse Replicate and build an app that transcribes uploaded audio with Whisper.Transcribe spoken audio into text.
The app sends recordings to a transcription model and returns the transcript in-app.
Image editing toolsUse Replicate and build a tool that removes backgrounds from uploaded product photos.Edit and enhance images automatically.
The app runs an image-processing model and returns the edited file to the user.
Avatar and sticker generatorsUse Replicate and build an app that creates custom avatar stickers from a selfie.Create personalized image content from user uploads.
The app feeds a user photo to a generation model and produces styled results.
Custom model appsUse Replicate and build an app that runs our fine-tuned model on customer inputs.Serve your own fine-tuned models inside your app.
The app calls a model you’ve trained on Replicate and shows the output to users.

How to connect Replicate

Workspace admins and owners can connect Replicate. You can create multiple Replicate connections using different API tokens, which is useful for separating environments (for example, development and production) or managing rate limits. When the connection is created, Replicate becomes available across all projects in the workspace. Anyone building in a project can ask Lovable in chat to link their project to it.

Prerequisites

Before connecting Replicate, make sure you have:
  • A Replicate account
  • A Replicate API token
  • Lovable workspace owner or admin role
All predictions run through this connector are billed by Replicate based on the model and how long each run takes. Billing and quota are handled directly by Replicate, not Lovable.

Step 1: Get a Replicate API token

A Replicate API token lets your Lovable app authenticate with the Replicate API. To create a Replicate API token:
1

Open your Replicate account

Sign in to Replicate.
2

Open API tokens

Go to Account settings → API tokens.
3

Create a token

Click Create token and give it a descriptive name, for example Lovable integration.
4

Copy the token

Copy the token (it starts with r8_) and store it securely.
Your API token functions like a password. Keep it secure and never share it publicly. You’ll need it in the next step.
See Replicate documentation for more: API tokens and security.

Step 2: Connect Replicate to Lovable

You can create multiple connections using different API tokens.
1

Open Replicate in Connectors

Go to Connectors → App connectors and select Replicate.
2

Add a connection

Click Add connection.
3

Configure the connection

  1. Display name: name the connection, for example Replicate Prod. This name is only used inside Lovable to identify the connection.
  2. API token: paste your Replicate API token (it starts with r8_).
4

Choose who can access this connection

Under Who can access this connection, decide who in your workspace can use the connection:
  • Only you (default): only the person creating the connection can use it and its associated data.
  • Invite specific people: only you and explicitly added workspace members can use the connection and its associated data.
  • Invite entire workspace: click Invite entire workspace to make the connection available to everyone in your Lovable workspace.
See Who can manage connections for more information.
5

Connect

Click Connect.
When connected, anyone building in a project can ask Lovable in chat to link their project to Replicate (based on configured connection-level access). Your Lovable apps can then generate images, video, audio, and text using Replicate models.

Limitations

The Replicate connector cannot:
  • Run predictions from client-side code. Calls go through Lovable from a server-side endpoint.
  • Refresh or rotate API tokens automatically. To rotate, create a new token in Replicate and update the Lovable connection.
  • Support per-end-user Replicate login. Each connection represents a single Replicate account shared across all projects linked to it.
Editors and above can remove specific projects from a connection without deleting the connection entirely. The connection will remain available for other projects. To unlink projects:
1

Open Connectors

Open Connectors, then go to App connectors, and select .
2

Open the connection

Open the connection you want to manage.
3

Select projects

Under Linked projects, check the projects you want to unlink.
4

Confirm

Click Unlink projects and confirm.
When unlinked, those projects will no longer have access to through this connection. If a project needs again, you can link it to any available connection.

How to delete a connection

Workspace admins and owners can delete connections. Other members can delete a connection if they created it, or if they have been explicitly granted access to it.
Deleting a connection is permanent and cannot be undone. It will remove the credentials from all linked projects, and any apps using this connection will stop working until a new connection is added.
Before deleting, review the Linked projects section to see which projects are currently using the connection. To delete a connection:
1

Open Connectors

Open Connectors, then go to App connectors, and select .
2

Open the connection

Open the connection you want to remove.
3

Review linked projects

Review the Linked projects section.
4

Delete

Under Delete this connection, click Delete and confirm.