- Documentation
- Integrations
- Apps
- Replicate integration
Replicate integration
Run open-source AI models on Replicate, fine-tune them, and continue a workflow when a run finishes, on behalf of your clients.
What it does
The Replicate integration lets your agency run any model on Replicate from inside a workflow. Connect a client's Replicate token once and your workflows can generate images, transcribe audio, run language models or a client's own deployment, wait for the result in the same step or continue a separate workflow when the run finishes, fine-tune trainable models on a client's data, upload input files, and look up models and versions.
Connect a Replicate account
- Open your workspace in TaskJuice and go to Connections.
- Choose Replicate and click Connect.
- In a new tab, open the Replicate API tokens page signed in as the client (or as your agency, when you run models on your own account).
- Click Create token, give it a name that identifies the workspace, and copy the
r8_...value. - Paste the token into TaskJuice and save the connection.
Replicate bills runs to the account that owns the token, from prepaid credit. To rotate a token, delete it on the API tokens page, create a new one, and update the connection.
Triggers
Replicate has no account-level webhooks. Each run carries its own webhook URL, and Replicate posts the run to it as it progresses. The trigger gives you that URL.
replicate/prediction-completedfires when a prediction finishes:succeeded,failed,canceledoraborted. Trainings use the same format, so it also fires when a training whose webhook points at it finishes.
To use it:
- Add the trigger to a workflow and copy the Replicate webhook URL shown on it.
- Get the account's webhook signing secret. Replicate shows it only through its API: run
curl -s -H "Authorization: Bearer <token>" https://api.replicate.com/v1/webhooks/default/secretand copy thekeyvalue (it starts withwhsec_). Paste it into the trigger's signing secret field so TaskJuice verifies every delivery. - In the workflow that starts the run, paste the URL into Webhook URL on Create Prediction, Run Official Model, Run Deployment or Create Training.
- Optional: set Webhook events to
["completed"]so Replicate only calls back once, with the final result.
Actions
Run models
replicate/create-predictionruns a model by version (owner/name:version, a bare version ID, orowner/namefor official models).replicate/create-model-prediction(Run Official Model) runs a model by owner and name on its latest version, for exampleblack-forest-labs/flux-schnell.replicate/create-deployment-prediction(Run Deployment) runs a prediction on one of your deployments.
All three accept Wait for result: set it (1 to 60 seconds) and the step returns the finished output itself, which suits fast image models. Leave it empty to return at once and continue from the trigger or Get Prediction. Cancel after sets a maximum run time.
Predictions
replicate/get-predictionreturns a prediction's status, output, logs and timing.replicate/list-predictionslists your account's predictions, optionally inside a creation time window.replicate/cancel-predictioncancels a running prediction.
Models and versions
replicate/search-modelsfinds public models and collections by keyword.replicate/list-modelslists public models.replicate/get-modelreturns a model, including its latest version and run count.replicate/create-modelcreates a model on your account, with a hardware picker.replicate/list-model-versionslists a model's versions.replicate/get-model-versionreturns one version, including the schema of the inputs it accepts.replicate/delete-model-versionpermanently deletes a version you own.
Training
replicate/create-trainingfine-tunes a trainable model version and pushes the result to a model you own.replicate/get-trainingreturns a training's status, logs and the version it produced.replicate/list-trainingslists your account's trainings.replicate/cancel-trainingcancels a running training.
Files and account
replicate/upload-fileuploads a file and returns a URL to pass as a model input.replicate/get-accountreturns the account the token belongs to.
Known limitations
- Replicate keeps uploaded files for 24 hours and removes API prediction inputs and outputs after one hour. Save outputs you need to keep, for example to cloud storage, in the same workflow.
- Sync mode waits at most 60 seconds. A slower run still returns, with status
processing; continue from the trigger or Get Prediction. - Streaming output is not exposed. Use Wait for result, the trigger, or Get Prediction.
- Start, output and logs webhook deliveries do not fire the trigger. Only a finished run does.
- Models that have been idle can take several minutes to boot on their first run. Plan timeouts accordingly.