Replicate Action Block
What it does: Runs open-source models hosted on Replicate (opens in a new tab) β image, video, audio, and language models β and brings their output back into your workflow.
π¨
In simple terms: Pick any model from Replicate (FLUX for images, Whisper for transcription, a Llama variant for textβ¦), give it a JSON input, and get back the generated file URLs or text.
Credentials
Create an API token at replicate.com/account/api-tokens (opens in a new tab) and paste it when connecting the block.
Actions
| Action | What it does | Output |
|---|---|---|
| Run Model | Runs a model by owner/name or owner/name:version | Prediction object + output + urls |
| Run Deployment | Runs one of your deployments (owner/name) | Prediction object |
| Get Prediction | Fetches a prediction, optionally waiting for it to finish | Prediction object |
| Cancel Prediction | Cancels a running prediction | Prediction object |
| List Predictions | Your recent predictions | Paginated list |
| Get Model | Model metadata and latest version | Model object |
| List Model Versions | All versions of a model | Version list |
| Search Models | Finds public models by search term | Paginated model list |
Waiting for results
Model runs are asynchronous by default. The Wait (seconds) field (0β60) sends Replicate's Prefer: wait=<n> header, which holds the request open until the prediction finishes:
- Wait set (e.g.
60) β the block returns the completed prediction, withoutputalready populated. Best for fast models. - Wait empty β the block returns immediately with
idandstatus: "starting". Follow up with a Wait block and Get Prediction using{{replicate.id}}. Best for slow video/large-image models.
Output shape
The block returns the full prediction object, plus two conveniences:
outputβ the model's raw output (a string, an array, or an object depending on the model).urlsβ present only when the output is a URL or an array of URLs, so you can pipe generated images/videos straight into a send-message or upload block.
Tips
- Model accepts
owner/name(always the latest version) orowner/name:versionHash(pinned β recommended for production, since a model update can change the output shape). - Input is the exact JSON shown on the model's API tab on replicate.com, e.g.
{"prompt":"a cat astronaut","aspect_ratio":"16:9"}. - Set a Webhook URL with a Webhook Events Filter of
completedto be notified when a long run finishes instead of polling. - Predictions bill per run β pin a version and cap
waitSecondsso a stuck run doesn't hold your workflow open.