Skip to main content
PUT
Update Instance Template

Authorizations

Authorization
string
header
required

API key must be provided in the Authorization header

Path Parameters

id
integer
required

Instance contract ID whose template to update.

Body

application/json
template_id
integer

Numeric ID of an existing template to apply to the instance.

Example:

99

template_hash_id
string

Hash ID of an existing template to apply; takes precedence over template_id.

Example:

"abc123def456"

image
string

Docker image reference to set on the instance.

Example:

"pytorch/pytorch:2.0.0-cuda11.7-cudnn8-runtime"

onstart
string

Shell script to run when the instance starts.

Example:

"pip install mypackage"

image_login
string

Docker registry login credentials used to pull a private image, in the format '-u -p '.

Example:

"-u myuser -p mypass docker.io"

disk
number

Disk allocation in GB; minimum 8 GB.

Example:

20

recycle
boolean

If true, immediately recycle the instance after applying the template update.

Example:

true

Response

Returns {success: true} on successful update, or the recycle response {success: true/false} if recycle was requested.

success
boolean

True when update succeeded