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).
- In the Appsanic project build, select Connectors → Replicate and enter it, or use the in-chat connect card.
The connection applies only to the project where you save it and requires a paid plan.
Once saved, the token is shown only as dots - you can confirm it exists but never read it back. Use Test now to re-check it against Replicate and Disconnect to remove it from the project.
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 must call a server-side relay that holds a dedicated token in its own environment. The agent can generate a Supabase Edge Function or another backend and its setup instructions, but connecting Replicate does not deploy it or transfer the saved token. Deploy it and add the token directly to that runtime's secret manager.
The token you save in the connector form is encrypted at rest with AES-256-GCM. Browser JavaScript sees only that a secret exists; the model prompt never receives the decrypted token; and the agent will never ask you for it in chat. See Connectors Overview for the full boundary.
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.
