Replicate
Replicate hosts thousands of open machine-learning models and runs them on demand, billed by the GPU-second. Connect it and the apps you build with Appsanic can generate images, transform video, transcribe or synthesise audio, and run almost any model from the Replicate catalogue without you standing up your own GPU servers.
Because every model has its own inputs and outputs, you tell the agent which model to use (or just describe the result you want), and it wires the call up for you.
What you get by connecting it
- Image, video, and audio models on demand - background removal, upscaling, style transfer, captioning, transcription, text-to-image, and more, picked from the Replicate catalogue.
- Run by name or by description - point the agent at a specific model (for example
stability-ai/sdxl) or describe the result, and it selects sensible inputs. - Long-running runs handled for you - runs are kicked off through the relay and then polled or driven by webhook until they finish, so a slow model does not block your app.
- Pay only for what you use - Replicate bills by the GPU-second, so idle time costs nothing.
Connecting it
You need a single credential: a Replicate API token, which starts with r8_.
- Sign in at replicate.com.
- Open Account, then API tokens.
- Copy a token (or create a new one).
- Paste it into Dashboard -> Connectors -> Replicate (or use the in-chat connect card during a build).
Connect once and every project in your account can use it. Connecting requires a paid plan.
Once saved, the token is shown only as dots - you can confirm it exists but never read it back. The connector page also gives you a Test connection control to re-check the token against Replicate, and a Disconnect control to remove it.
Keys and security
A Replicate token is a secret key: anyone holding it can run models and spend your money, so it must never be bundled into an app people download.
For that reason your generated app never calls Replicate directly. Instead it talks to a small server-side relay that holds the token in its own environment. With Supabase connected, Appsanic can deploy that relay for you as a Supabase Edge Function - you paste the token into your Supabase secrets, following the setup instructions the agent generates, and the app calls the relay rather than the provider.
The token you save in the connector page is encrypted at rest with AES-256-GCM. The browser only ever sees that a secret exists, never its value; the AI never sees the decrypted token; and the agent will never ask you for it in chat. See Connectors Overview for the full credential model.
Useful links
- Replicate documentation: https://replicate.com/docs
- AI Features in Your App - the broader guide to adding AI to what you build.
Next
Read AI Features to see how Replicate fits alongside the other ways you can add intelligence to your app.
