Connect your app to Replicate
Replicate lets you run machine learning models through one account. Connect it to Mythos when your app needs a particular model for generating or transforming images, video, audio, or text.
Replicate is an App + chat connector: use it in project chat while building and in the app you publish. The models you can run depend on what your Replicate account can access.
Your app can use Replicate to generate images from prompts, transform existing images, create video clips, transcribe recordings, or run a model you have trained. The input and output differ between models, so include the model’s Replicate link when you already know which one you want.
Examples to build
Ask Mythos to check the model’s required inputs before building the form. For example, a video model may require an image URL, while an image model may require a prompt and an aspect ratio.
Connect Replicate to Mythos
You need permission to create App + chat connections in your workspace. An existing saved connection can be linked to another project if you have access to it.
Before you start
You will need a Replicate account and API token. Add billing or credits in Replicate before running a model that requires payment.
Replicate charges for predictions and other paid work under its own pricing. Model runs, training, and deployments can have different costs. Connecting an account does not run a model or include a generation allowance.
1. Create an API token
- Sign in to Replicate.
- Open Account settings → API tokens.
- Create a token named for its purpose, such as
Mythos media. - Copy the token and store it securely. Tokens start with
r8_.
Use the token in the setup form, never in a chat prompt or public app file. See Replicate’s API token guide for account-side controls.
2. Save the connection
- Open Connectors from the Dashboard and select Replicate. If a connection already exists, select Add connection to open a new form.
- Enter a Display name, such as
Product media. - Paste the token into API token.
- Under Sharing, leave the connection Private or use Share with others to select members. Choose Share with workspace if the whole workspace should use it.
- Click Connect Replicate. Mythos checks your account without starting a prediction.
In your project, open Chat actions (+) → Project connectors, select the saved Replicate connection, and click Use in this project.
A useful first request is:
Show me the inputs expected by this Replicate model: [model link]. Then build a form for those inputs, with a visible generation status and saved output.
Running a model spends Replicate credits and can proceed without a separate approval question in chat. Review the model and inputs in your request before starting the first run. When a prediction is still running, check its status instead of submitting the same inputs again. Training and deployment changes follow the connection’s approval setting.
Limitations
- Output links are temporary. Replicate-hosted output can expire. Ask Mythos to save images, audio, and video in your app’s storage when it builds the feature, rather than displaying only a temporary URL. See Replicate’s output-file guidance.
- Tokens are not rotated automatically. When a token is replaced, create a new connection with that token.
- One connection uses one account. Your app’s visitors do not each authorize their own Replicate account through this connection.
- A model needs its own valid inputs. A working account connection does not guarantee that a particular model version or input combination will run.
If a prediction fails
An Insufficient credit response means the Replicate account needs billing or credits. Check Replicate billing even if the connection itself still appears connected.
For an input error, ask Mythos to compare the submitted values with the chosen model’s input requirements. If the result is pending or unclear, look up the existing prediction before running it again. If a completed result no longer loads, check whether its temporary file URL has expired.
Manage the connection
Open Connectors → Replicate and select the connection. Use Unlink projects for selected projects, or Disconnect to stop access through the saved connection.
Disconnecting does not cancel a prediction, training job, or deployment already running in Replicate. Review those resources in Replicate separately. Saved files in your app are not removed by disconnecting. To change the token, disconnect the old connection, create a new one with the replacement token, and link it to the affected projects. Ask Mythos to set up their app features again.