capabilities.work

Scale a Deployment and Run a Prediction

A 4-step recipe with Replicate. We can help you get access.

Recipe · 4 steps

Scale a Deployment and Run a Prediction

with Replicate · Artificial Intelligence Management

Update a deployment's version and scaling, then run a prediction through it.

  1. Read the current deployment release so its existing configuration is known before updating it.
  2. Patch the deployment with the new version and instance bounds. This increments the release number.
  3. Run a prediction through the updated deployment.
  4. 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.
  • deploymentOwner: The owner of the deployment to update.
  • deploymentName: The name of the deployment to update.
  • version: The model version ID to deploy.
  • 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:scale-deployment-and-predict, 4 operations: deployments.get → deployments.update → deployments.predictions.create → predictions.get. Specs on APIs.io.