Vast.ai API
Instances

Execute Remote Command

1min
PUT
https://console.vast.ai/api/v0/instances/command/{id}/

Executes a constrained remote command on a specified instance. The command output can be retrieved from the returned result URL.

CLI Usage: vastai execute <instance_id> Example: vastai execute 12345 "ls -l"

Authentication
BearerAuth
Path Parameters
id
*
Body Parameters
body
*
command
*
Responses
200
Command queued successfully
success
writeable_path
result_url
msg
400
Invalid request parameters
success
error
msg
401
Unauthorized - Invalid or missing API key
success
error
msg
403
Forbidden - User is blacklisted
success
error
msg
429
Too Many Requests
detail
483
Invalid JSON body
success
error
msg