v1
latestOpenAPI 3.1.02026-07-13897404.3 KBInstances
execute
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> <command>
put/api/v0/instances/command/{id}/
Path parameters
idinteger required
Example:12345
ID of the instance to execute command on
Request body
Example request
{
"command": "ls -l"
}Response
Command queued successfully
Example response
{
"success": true,
"writeable_path": "/workspace",
"result_url": "https://s3.amazonaws.com/vast.ai/instance_logs/abc123.log",
"msg": "Command is executing, wait a few seconds and then view the result_url"
}