v1

latestOpenAPI 3.1.02026-07-13897404.3 KB
Instances

manage instance

Manage instance state and labels. The operation is determined by the request body parameters.

CLI Usage:

  • To stop: vastai stop instance <id>
  • To start: vastai start instance <id>
  • To label: vastai label instance <id> <label>
put/api/v0/instances/{id}/

Path parameters

idinteger required

ID of the instance to modify

Request body

state'stopped' | 'running'

Change instance state (optional)

labelstring

Text label to assign to the instance (optional)

Example request

{
  "state": "stopped",
  "label": "My ML Training Job"
}

Response

Operation completed successfully

successboolean

Example response

{
  "success": true
}