Replicate
connector.replicate · connector.replicate_trigger · ai
Run models on Replicate, manage predictions, trainings, deployments and files, and react to finished predictions.
Vendor API documentation: https://replicate.com/docs/reference/http
Authentication
| Method | Credential kind | Auth kind | Fields | Test request |
|---|---|---|---|---|
| API token | replicate/api_token | bearer | token (secret) | yes |
Actions
Node type connector.replicate. Choose a resource and an operation; each operation has its own parameters.
Prediction
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Create a prediction | prediction.create | writes | 4 | |
| Run a model and wait | prediction.run | writes | 2 | |
| Get a prediction | prediction.get | reads | 1 | |
| Cancel a prediction | prediction.cancel | writes | 1 | |
| List predictions | prediction.list | reads | yes | 1 |
Create a prediction
Operation prediction.create. Starts a model run. With “Wait up to” set, Replicate holds the request open until the prediction finishes or the time runs out (max 60 s); otherwise the starting prediction is returned at once.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
target | options | "model" | Run. One of model, version, deployment. | ||
model | resource_locator | yes | target = model, version | Values from lookup models. | |
version | resource_locator | yes | target = version | Depends on model. Values from lookup model_versions. | |
deployment | resource_locator | yes | target = deployment | Values from lookup deployments. | |
input | json | yes | The model’s input object, for example {“prompt”: “a red fox”}. | ||
wait_seconds | number | 60 | Wait up to (seconds). 1 to 60. 0 returns immediately. | ||
options | collection | ||||
options.webhook | string | Webhook URL. Replicate POSTs the prediction here as it progresses (use the Replicate trigger’s URL). | |||
options.webhook_events_filter | multi_options | Webhook events. One of start, output, logs, completed. | |||
options.cancel_after | string | Maximum run time, for example 30s, 5m or 1h (minimum 5s). |
Run a model and wait
Operation prediction.run. Creates a prediction and polls it until it succeeds, fails or is canceled, for runs longer than the 60-second synchronous window. Optionally downloads file outputs into binary fields.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
target | options | "model" | Run. One of model, version, deployment. | ||
model | resource_locator | yes | target = model, version | Values from lookup models. | |
version | resource_locator | yes | target = version | Depends on model. Values from lookup model_versions. | |
deployment | resource_locator | yes | target = deployment | Values from lookup deployments. | |
input | json | yes | |||
poll_interval_seconds | number | 2 | Poll every (seconds). | ||
timeout_seconds | number | 900 | Give up after (seconds). | ||
cancel_on_timeout | boolean | true | |||
fail_on_error | boolean | true | Fail the node when the prediction fails. | ||
download_output | boolean | false | Download output files. | ||
output_property | string | "data" | download_output = true | Output binary field prefix. |
Get a prediction
Operation prediction.get.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
prediction_id | resource_locator | yes | Prediction. Values from lookup predictions. |
Cancel a prediction
Operation prediction.cancel.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
prediction_id | resource_locator | yes | Prediction. Values from lookup predictions. |
List predictions
Operation prediction.list. Newest first.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
return_all | boolean | false | |||
limit | number | 50 | return_all = false | ||
created_after | datetime | ||||
created_before | datetime | ||||
source | options | Created from. One of api, web. |
Model
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Get a model | model.get | reads | 1 | |
| Search models | model.search | reads | 1 | |
| List public models | model.list | reads | yes | 1 |
| List model versions | model.list_versions | reads | yes | 1 |
| Get a model version | model.get_version | reads | 1 |
Get a model
Operation model.get.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
model | resource_locator | yes | Values from lookup models. |
Search models
Operation model.search.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
query | string | yes | |||
max_results | number | 20 | 1 to 50. |
List public models
Operation model.list.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
return_all | boolean | false | |||
limit | number | 50 | return_all = false | ||
sort_by | options | "latest_version_created_at" | One of model_created_at, latest_version_created_at. | ||
sort_direction | options | "desc" | Direction. One of asc, desc. |
List model versions
Operation model.list_versions.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
model | resource_locator | yes | Values from lookup models. | ||
return_all | boolean | false | |||
limit | number | 50 | return_all = false |
Get a model version
Operation model.get_version.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
model | resource_locator | yes | Values from lookup models. | ||
version | resource_locator | yes | Depends on model. Values from lookup model_versions. |
Collection
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| List collections | collection.list | reads | yes | 1 |
| Get a collection | collection.get | reads | 1 |
List collections
Operation collection.list.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
return_all | boolean | false | |||
limit | number | 50 | return_all = false |
Get a collection
Operation collection.get. Returns the collection with its models.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
collection | resource_locator | yes | Values from lookup collections. |
Deployment
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| List deployments | deployment.list | reads | yes | 1 |
| Get a deployment | deployment.get | reads | 1 |
List deployments
Operation deployment.list.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
return_all | boolean | false | |||
limit | number | 50 | return_all = false |
Get a deployment
Operation deployment.get.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
deployment | resource_locator | yes | Values from lookup deployments. |
Training
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Create a training | training.create | writes | 1 | |
| Get a training | training.get | reads | 1 | |
| List trainings | training.list | reads | yes | 1 |
| Cancel a training | training.cancel | writes | 1 |
Create a training
Operation training.create.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
model | resource_locator | yes | Values from lookup models. | ||
version | resource_locator | yes | Base version. Depends on model. Values from lookup model_versions. | ||
destination | string | yes | Destination model. | ||
input | json | yes | Training input. | ||
webhook | string | Webhook URL. | |||
webhook_events_filter | multi_options | Webhook events. One of start, output, logs, completed. |
Get a training
Operation training.get.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
training_id | resource_locator | yes | Training. Values from lookup trainings. |
List trainings
Operation training.list.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
return_all | boolean | false | |||
limit | number | 50 | return_all = false |
Cancel a training
Operation training.cancel.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
training_id | resource_locator | yes | Training. Values from lookup trainings. |
File
Files up to 100 MB that can be passed to model inputs by URL.
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Upload a file | file.upload | writes | 1 | |
| List files | file.list | reads | yes | 1 |
| Get a file | file.get | reads | 1 | |
| Delete a file | file.delete | writes | 1 |
Upload a file
Operation file.upload.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
binary_property | binary_property | "data" | yes | Input binary field. | |
metadata | json |
List files
Operation file.list.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
return_all | boolean | false | |||
limit | number | 50 | return_all = false |
Get a file
Operation file.get.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
file_id | resource_locator | yes | File. Values from lookup files. |
Delete a file
Operation file.delete.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
file_id | resource_locator | yes | File. Values from lookup files. |
Account
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Get the current account | account.get | reads | 1 |
Get the current account
Operation account.get.
This node has no parameters.
Hardware
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| List hardware | hardware.list | reads | 1 |
List hardware
Operation hardware.list.
This node has no parameters.
Lookups
Lookups fill dropdowns and resource pickers in the editor from the vendor API.
| Lookup | Depends on | Search | Description |
|---|---|---|---|
models | server-side | {{ item.model.description }} | |
model_versions | model | client-side | |
deployments | client-side | ||
predictions | client-side | ||
trainings | client-side | ||
files | client-side | ||
collections | client-side | {{ item.description }} |
Triggers
Node type connector.replicate_trigger.
| Trigger | ID | Kind | Deduplication key | Signature | Webhook registration | Cassette tests |
|---|---|---|---|---|---|---|
| On prediction finished | prediction_completed | poll | {{ item.id }}:{{ item.status }} | 0 | ||
| On prediction webhook | prediction_webhook | webhook | hmac_sha256 | automatic | 0 |
Trigger: On prediction finished
Polls recent predictions and emits each one once it has finished.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
statuses | multi_options | ["succeeded","failed","canceled"] | One of succeeded, failed, canceled. | ||
model | string | Only this model. |
Trigger: On prediction webhook
Receives prediction updates that Replicate sends to this trigger’s URL. Pass the URL as the Webhook URL when creating predictions. Signatures are verified with the account’s signing secret.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
events | multi_options | ["succeeded","failed","canceled"] | Statuses to accept. One of starting, processing, succeeded, failed, canceled. |
Import
No exported node type imports to this node.
Provenance
Written from the vendor’s documentation: