Pick a Model from a Collection and Predict
A 4-step recipe with Replicate. We can help you get access.
Recipe · 4 steps
Pick a Model from a Collection and Predict
with Replicate · Artificial Intelligence Management
Resolve a model from a curated collection and run a prediction on its latest version.
- Read the curated collection to confirm it exists and that it lists models to choose from.
- Confirm the chosen model and capture its latest version ID to run.
- Create a prediction for the chosen model's latest version with the supplied input.
- 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.
- collectionSlug: The slug of the collection, like super-resolution or text-to-image.
- modelOwner: The owner of the model chosen from the collection.
- modelName: The name of the model chosen from the collection.
- input: The model's input as a JSON object for the prediction.
For your developer
Arazzo workflow replicate:collection-predict, 4 operations: collections.get → models.get → predictions.create → predictions.get. Specs on APIs.io.