{ "opencollection": "1.0.0", "info": { "name": "Vast.ai Accounts Instances API", "version": "1.0.0" }, "request": { "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "items": [ { "info": { "name": "Instances", "type": "folder" }, "items": [ { "info": { "name": "attach ssh-key", "type": "http" }, "http": { "method": "POST", "url": "https://console.vast.ai/api/v0/instances/:id/ssh/", "params": [ { "name": "id", "value": "", "type": "path", "description": "ID of the instance to attach the SSH key to" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Attaches an SSH key to the specified instance, allowing SSH access using the provided key.\n\nCLI Usage: vast attach instance_id ssh_key" }, { "info": { "name": "copy", "type": "http" }, "http": { "method": "PUT", "url": "https://console.vast.ai/api/v0/commands/copy_direct/", "body": { "type": "json", "data": "{}" } }, "docs": "Initiate a remote copy operation to transfer data from one instance to another or between an instance and the local machine." }, { "info": { "name": "cancel copy", "type": "http" }, "http": { "method": "DELETE", "url": "https://console.vast.ai/api/v0/commands/copy_direct/", "body": { "type": "json", "data": "{}" } }, "docs": "Cancel a remote copy operation specified by the destination ID (dst_id)." }, { "info": { "name": "cloud copy", "type": "http" }, "http": { "method": "POST", "url": "https://console.vast.ai/api/v0/commands/rclone/", "body": { "type": "json", "data": "{}" } }, "docs": "Starts a cloud copy operation by sending a command to the remote server. The operation can transfer data between an instance and a cloud service." }, { "info": { "name": "cancel sync", "type": "http" }, "http": { "method": "DELETE", "url": "https://console.vast.ai/api/v0/commands/rclone/", "body": { "type": "json", "data": "{}" } }, "docs": "Cancels an in-progress remote sync operation identified by the destination instance ID.\nThis operation cannot be resumed once canceled and must be restarted if needed." }, { "info": { "name": "change bid", "type": "http" }, "http": { "method": "PUT", "url": "https://console.vast.ai/api/v0/instances/bid_price/:id/", "params": [ { "name": "id", "value": "", "type": "path", "description": "Instance ID" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Change the current bid price of an instance to a specified price.\nCLI Usage: vastai change bid id [--price PRICE]" }, { "info": { "name": "create instance", "type": "http" }, "http": { "method": "PUT", "url": "https://console.vast.ai/api/v0/asks/:id/", "params": [ { "name": "id", "value": "", "type": "path", "description": "ID of the offer to accept" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Creates a new instance by accepting an \"ask\" contract from a provider. This is the main endpoint for launching new instances on Vast.ai.\nCLI Usage: vast create instance [options]" }, { "info": { "name": "show instance", "type": "http" }, "http": { "method": "GET", "url": "https://console.vast.ai/api/v0/instances/:id/", "params": [ { "name": "id", "value": "123", "type": "path", "description": "The ID of the instance to retrieve." } ] }, "docs": "Retrieves the details of a specific instance for the authenticated user.\nThis endpoint returns detailed information including SSH connection parameters, instance state, resource utilization, template data, and pricing details." }, { "info": { "name": "manage instance", "type": "http" }, "http": { "method": "PUT", "url": "https://console.vast.ai/api/v0/instances/:id/", "params": [ { "name": "id", "value": "1234", "type": "path", "description": "ID of the instance to modify" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Manage instance state and labels. The operation is determined by the request body parameters.\n\nCLI Usage:\n- To stop: vastai stop instance \n- To start: vastai start instance \n- To label: vastai label instance