Create a Deployment and Run a Prediction Through It
A 4-step recipe with Replicate. We can help you get access.
Recipe · 4 steps
Create a Deployment and Run a Prediction Through It
with Replicate · Artificial Intelligence Management
Create a deployment for a model version and run a prediction through it.
- List the available hardware SKUs so the requested hardware can be validated before creating the deployment.
- Create the deployment, pinning the model version to the chosen hardware and instance bounds.
- Run a prediction through the newly created deployment using its owner and name.
- 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.
- name: The name of the deployment to create.
- model: The full name of the model to deploy e.g. stability-ai/sdxl.
- version: The 64-character model version ID to deploy.
- hardware: The hardware SKU to run the model on (from hardware.list).
- minInstances: The minimum number of instances for scaling.
- maxInstances: The maximum number of instances for scaling.
- input: The model's input as a JSON object for the prediction.
For your developer
Arazzo workflow replicate:deploy-and-predict, 4 operations: hardware.list → deployments.create → deployments.predictions.create → predictions.get. Specs on APIs.io.