- Documentation
Replicate integration
Run open-source AI models on Replicate and react to prediction completions on behalf of your clients.
What it does
The Replicate integration lets your agency invoke any public model on Replicate from inside a workflow, poll for prediction status, cancel long-running jobs, and browse the catalog of available models. Connect a client's Replicate token once and your workflows can run image generation, transcription, language models, or fine-tuned community checkpoints, then continue the workflow when each prediction finishes via the prediction-completed webhook trigger.
Connect a Replicate account
- Open your workspace in TaskJuice and navigate 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, if the client has delegated token creation to you).
- 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.
To rotate or revoke the token later, return to the Replicate API tokens page and delete the entry; create a new token and update the TaskJuice connection.
Triggers
replicate/prediction-completedfires when a prediction reaches a terminal state (succeeded,failed, orcanceled). Pass the agency's webhook URL on the Create Prediction call, and Replicate posts the prediction body when the job ends.
Actions
replicate/create-predictionstarts a prediction against a specific model version, with an arbitrary input object matching the model's schema and an optional webhook URL plus event filter.replicate/get-predictionfetches the current state of a prediction by ID, including status, output, logs, and timing fields.replicate/cancel-predictioncancels a running prediction by ID. Useful for guardrails on long-running jobs or user-triggered cancellation.replicate/list-modelsreturns the catalog of public Replicate models, paginated via cursor. Use this to surface a model picker to end users or to discover the latest version hash for a given model.
Known limitations
- The integration calls the Replicate REST API with the connected token. Per-token spend caps, queue priority, and model-access entitlements are governed by the client's Replicate account, not by TaskJuice. When Replicate returns a 429, TaskJuice surfaces it as a retryable rate-limit error and honors the recommended backoff.
- Streaming prediction output is not exposed. Each Create Prediction call returns the initial prediction record; use the prediction-completed webhook trigger (or poll Get Prediction) to continue the workflow when the job finishes.
- The prediction-completed webhook authenticates via a shared-secret
Authorizationheader on the URL configured at create time. Rotate the secret by updating the workflow's create-prediction inputs. - Cold-boot latency on large models can be several minutes on the first call after a model has been idle. Plan timeouts and downstream node configuration accordingly.
Was this helpful?