PATCH
/
models
/
v2
/
{modelId}
curl --request PATCH \
  --url https://api.bytez.com/models/v2/{modelId} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "timeout": 5,
  "capacity": {
    "min": 0,
    "desired": 1,
    "max": 1
  }
}'
{
  "error": null,
  "output": {
    "modelId": "stabilityai/stable-diffusion-xl-base-1.0",
    "status": "booting instance",
    "created": "2025-04-22T17:57:40.036Z",
    "modified": "2025-04-22T17:57:58.638Z",
    "timeout": 2,
    "capacity": {
      "min": 2,
      "desired": 5,
      "max": 10
    },
    "instances": 1,
    "inferences": 0,
    "lastInference": "2025-04-22T17:57:40.036Z"
  }
}

Authorizations

Authorization
string
header
required

Set Authorization header to Key BYTEZ_KEY (e.g. 'Authorization': 'Key ABC123')

Path Parameters

modelId
string
required

The model you want to run (e.g., openai-community/gpt2).

Body

application/json
Update cluster behavior using `timeout` and `capacity`
timeout
integer
default:5

Minutes to wait before shutting down if no requests are received

capacity
object

Response

200
application/json
Returns the updated Cluster with your new settings.
error
string

Null if everything is fine

Example:

null

output
object

Your cluster