KBAISE/ for lovable
Library
Docs

Connect your app to Replicate

about 5 minBuildingchecked 4d agoOfficial page
The short version

Connect your Lovable app to Replicate to generate images, video, audio, or text with open-source AI models. After adding your API token in Lovable, you can run models like FLUX or Whisper directly inside your app.

Anyone who needs specialized open-source AI models for media generation or transcription beyond Lovable's built-in AI tools.

Do this, in order

  1. 1

    Sign in to Replicate, navigate to Account settings > API tokens, and create a new token.

    Lovable requires this secret key to authenticate requests with Replicate.

  2. 2

    Open Connectors in your Lovable dashboard, select Replicate, and click Connect.

    This starts the setup flow to link Replicate across your Lovable workspace.

  3. 3

    Enter a display name, paste your Replicate API token, and set your sharing preferences.

    Lovable verifies the token with Replicate and determines which workspace members can use this connection.

  4. 4

    Click Connect at the bottom of the form to save the integration.

    This saves the validated credentials and makes the connector available to your projects.

  5. 5

    In your project chat, prompt Lovable to link the Replicate connection, run your chosen model, and save output files to app storage.

    Replicate output links expire after about an hour, so your app must permanently save generated media.

Paste this into your project

Connect this project to Replicate and build a text-to-image generator using the FLUX model. Ensure that any generated images are saved directly to project storage so the temporary Replicate URLs do not expire.

Words decoded

Replicate
A cloud platform that hosts and runs community-built open-source artificial intelligence models on demand.
API token
A unique secret code that works like a password so Lovable can talk to your Replicate account.
Prediction
A single run of an AI model to create an output, such as making an image or transcribing a sound file.

Where people get stuck

  • Replicate file URLs expire after approximately one hour, so you must instruct Lovable to save generated files into your own app storage.
  • Model usage is billed directly by Replicate; running out of Replicate account credits causes a 402 'Insufficient credit' error.
  • Connections represent one shared Replicate account; end users cannot sign into their individual Replicate accounts through the app.
  • On Business or Enterprise plans, workspace admin settings might block non-admins from creating new connections.

The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.