Resolve Latest Version and Predict
A 4-step recipe with Replicate. We can help you get access.
Recipe · 4 steps
Resolve Latest Version and Predict
with Replicate · Artificial Intelligence Management
Resolve a model's latest version and run a prediction against it.
- Read the model object to confirm it exists and capture its latest version reference before listing versions.
- List the model's versions, which are returned most recent first, and capture the newest version ID to run.
- Create a prediction for the resolved version and supplied input. The prediction is returned in a starting state to be polled.
- Retrieve the prediction state, repeating via the retry branch until the prediction reaches a terminal status.
What you'll need to have ready
- apiToken: Replicate API token used as a Bearer credential.
- modelOwner: The name of the user or organization that owns the model.
- modelName: The name of the model.
- input: The model's input as a JSON object matching the version's input schema.
For your developer
Arazzo workflow replicate:resolve-version-and-predict, 4 operations: models.get → models.versions.list → predictions.create → predictions.get. Specs on APIs.io.