Overview
This node integrates with the Replicate API to run machine learning model predictions. It allows users to specify a model by name and version, provide input properties for the prediction, and then executes the prediction request on Replicate's platform. The node waits for the prediction to complete by polling the provided status URL and returns the prediction results.
Common scenarios include:
- Running inference on custom or public ML models hosted on Replicate.
- Automating workflows that require AI-generated outputs such as image generation, text completion, or data classification.
- Integrating model predictions into larger automation pipelines without manual API calls.
Example use case:
- A user wants to generate images using a specific version of a generative model. They configure the node with the model name, select the version, provide input parameters like prompt text, and receive the generated image URLs in the output.
Properties
| Name | Meaning |
|---|---|
| Model Name | The full identifier of the model to run, typically in the format account/model-name. |
| Model Version | The specific version of the model to use for prediction. This is selected from available versions. |
| Properties | Key-value pairs representing input parameters for the model. Each property has: |
| - Key Name or ID: Selectable from the model's input schema or specified via expression. | |
| - Type: Automatically determined (boolean, number, string). | |
| - Boolean / Number / String Value: The actual value to pass for the property based on its type. |
Output
The node outputs an array of JSON objects representing the prediction results returned by the Replicate API. The structure corresponds to the model's output schema and includes all relevant prediction data.
If the model produces binary data (e.g., images), the output will contain URLs or references to those resources rather than raw binary content.
Dependencies
- Requires an API key credential for authenticating with the Replicate API.
- The node uses HTTP requests to interact with Replicate endpoints:
- To fetch model versions.
- To fetch model input properties.
- To create and poll predictions.
No additional environment variables are required beyond the configured API authentication.
Troubleshooting
- "No get url found in response": Indicates the prediction creation response did not include a URL to poll for results. Verify the model name and version are correct and that the API key has proper permissions.
- "Error getting data from replicate": Occurs when polling the prediction status fails repeatedly. Could be due to network issues or API rate limits. Retrying after some time or checking API quota may help.
- "Prediction failed": The prediction job itself failed on Replicate's side. Check the input parameters for correctness and ensure the model version supports the given inputs.
- Ensure that the model version and properties are correctly selected; mismatches can cause errors or unexpected behavior.
- The node polls every 5 seconds and retries up to 3 times on failure when fetching prediction results.