- 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 you 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, manage deployments and uploaded files, and look up models, versions and collections.
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 organization, 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, choose its Replicate connection and copy the 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 Webhook signing secret on the Replicate connection this trigger uses, so every delivery is verified. Without it, deliveries are refused. - 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. It works only for official models; Replicate answers not found for any other model, so run those with Create Prediction and a version.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/update-modelupdates a model you own: its description, README and links.replicate/delete-modelpermanently deletes a private model you own once it has no versions left.replicate/get-model-readmereturns a model's README as Markdown.replicate/list-model-exampleslists the example predictions a model's author saved.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.replicate/list-collectionslists Replicate's curated collections, such as text-to-image.replicate/get-collectionreturns a collection and its models, with a collection picker.replicate/list-hardwarelists the hardware models and deployments can run on.
Deployments
replicate/create-deploymentserves one model version on fixed hardware with autoscaling limits, with version and hardware pickers.replicate/get-deploymentreturns a deployment's current release.replicate/list-deploymentslists your account's deployments.replicate/update-deploymentchanges a deployment's version, hardware or instance limits.replicate/delete-deploymentpermanently deletes a deployment.
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/list-files,replicate/get-fileandreplicate/delete-filelist, look up and delete uploaded files, with a file picker.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.
- A deployment with a minimum above 0 instances is billed while idle. Replicate only deletes a deployment after it has been offline and unused for 15 minutes.
- While an account holds less than $5 of credit, Replicate allows only 6 new runs per minute. A step over that limit waits and retries on its own.
- Models that have been idle can take several minutes to boot on their first run. Plan timeouts accordingly.