PUT
/
models
/
v2
/
{modelId}
curl --request PUT \
  --url https://api.bytez.com/models/v2/{modelId} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "timeout": 10,
  "capacity": {
    "min": 0,
    "desired": 1,
    "max": 1
  }
}'
{
  "error": null,
  "output": "Loading"
}

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
Define cluster behavior using `timeout` and `capacity`
timeout
integer
default:10

Minutes to wait before shutting down if no requests are received

capacity
object

Response

202
application/json
Cluster created successfully.
error
string

Null if everything is fine

Example:

null

output
string

Operation success message

Example:

"Loading"