# create api-key Source: https://docs.vast.ai/api-reference/accounts/create-api-key api-reference/openapi.json post /api/v0/auth/apikeys/ Creates a new API key with specified permissions for the authenticated user. CLI Usage: `vastai create api-key --name --permission_file [--key_params ]` # create env-var Source: https://docs.vast.ai/api-reference/accounts/create-env-var api-reference/openapi.json post /api/v0/secrets/ Creates a new encrypted environment variable for the authenticated user. Keys are automatically converted to uppercase. Values are encrypted before storage. There is a limit on the total number of environment variables per user. CLI Usage: `vastai create env-var ` # create ssh-key Source: https://docs.vast.ai/api-reference/accounts/create-ssh-key api-reference/openapi.json post /api/v0/ssh/ Creates a new SSH key and associates it with your account. The key will be automatically added to all your current instances. CLI Usage: `vastai create ssh-key ` # create subaccount Source: https://docs.vast.ai/api-reference/accounts/create-subaccount api-reference/openapi.json post /api/v0/users/ Creates either a standalone user account or a subaccount under a parent account. Subaccounts can be restricted to host-only functionality. CLI Usage: `vastai create subaccount --email --username --password [--type host]` # delete api key Source: https://docs.vast.ai/api-reference/accounts/delete-api-key api-reference/openapi.json delete /api/v0/auth/apikeys/{id}/ Deletes an existing API key belonging to the authenticated user. The API key is soft-deleted by setting a deleted_at timestamp. CLI Usage: `vastai delete api-key ` # delete env var Source: https://docs.vast.ai/api-reference/accounts/delete-env-var api-reference/openapi.json delete /api/v0/secrets/ Deletes an environment variable associated with the authenticated user. The variable must exist and belong to the requesting user. CLI Usage: `vastai delete env-var ` # delete ssh key Source: https://docs.vast.ai/api-reference/accounts/delete-ssh-key api-reference/openapi.json delete /api/v0/ssh/{id}/ Removes an SSH key from the authenticated user's account CLI Usage: `vastai delete ssh-key ` # set user Source: https://docs.vast.ai/api-reference/accounts/set-user api-reference/openapi.json put /api/v0/users/ Updates the user data for the authenticated user. CLI Usage: `vastai set user --file ` # show api keys Source: https://docs.vast.ai/api-reference/accounts/show-api-keys api-reference/openapi.json get /api/v0/auth/apikeys/ Retrieves all API keys associated with the authenticated user. CLI Usage: `vastai show api-keys` # show connections Source: https://docs.vast.ai/api-reference/accounts/show-connections api-reference/openapi.json get /api/v0/users/cloud_integrations/ Retrieves the list of cloud connections associated with the authenticated user. CLI Usage: `vastai show connections` # show env vars Source: https://docs.vast.ai/api-reference/accounts/show-env-vars api-reference/openapi.json get /api/v0/secrets/ Retrieve a list of environment variables (secrets) for the authenticated user. CLI Usage: `vastai show env-vars [-s]` # show ipaddrs Source: https://docs.vast.ai/api-reference/accounts/show-ipaddrs api-reference/openapi.json get /api/v0/users/{user_id}/ipaddrs/ This endpoint retrieves the history of IP address accesses for the authenticated user. CLI Usage: `vastai show ipaddrs` # show ssh keys Source: https://docs.vast.ai/api-reference/accounts/show-ssh-keys api-reference/openapi.json get /api/v0/ssh/ Retrieve a list of SSH keys associated with the authenticated user's account. CLI Usage: `vastai show ssh-keys` # show subaccounts Source: https://docs.vast.ai/api-reference/accounts/show-subaccounts api-reference/openapi.json get /api/v0/subaccounts/ Retrieve a list of subaccounts associated with the authenticated user's account. CLI Usage: `vastai show subaccounts` # show team role Source: https://docs.vast.ai/api-reference/accounts/show-team-role api-reference/openapi.json get /api/v0/team/roles/{id}/ Retrieve details of a specific team role by its name. CLI Usage: `vastai show team-role ` # show user Source: https://docs.vast.ai/api-reference/accounts/show-user api-reference/openapi.json get /api/v0/users/current/ Retrieve information about the current authenticated user, excluding the API key. CLI Usage: `vastai show user` # transfer credit Source: https://docs.vast.ai/api-reference/accounts/transfer-credit api-reference/openapi.json put /api/v0/commands/transfer_credit/ Transfers specified amount of credits from the authenticated user's account to another user's account. The recipient can be specified by either email address or user ID. CLI Usage: `vastai transfer credit ` # update env var Source: https://docs.vast.ai/api-reference/accounts/update-env-var api-reference/openapi.json put /api/v0/secrets/ Updates the value of an existing environment variable for the authenticated user. CLI Usage: `vastai update env-var ` # update ssh key Source: https://docs.vast.ai/api-reference/accounts/update-ssh-key api-reference/openapi.json put /api/v0/ssh/{id}/ Updates the specified SSH key with the provided value. CLI Usage: `vastai update ssh-key ` # search invoices Source: https://docs.vast.ai/api-reference/billing/search-invoices api-reference/openapi.json get /api/v0/invoices This endpoint allows users to search and retrieve invoices based on specified filters. CLI Usage: `vastai search invoices` # show deposit Source: https://docs.vast.ai/api-reference/billing/show-deposit api-reference/openapi.json get /api/v0/instances/balance/{id}/ Retrieves the deposit details for a specified instance. CLI Usage: `vastai show deposit ` # show earnings Source: https://docs.vast.ai/api-reference/billing/show-earnings api-reference/openapi.json get /api/v0/users/{user_id}/machine-earnings/ Retrieves the earnings history for a specified time range and optionally per machine. CLI Usage: `vastai show earnings [options]` # show invoices Source: https://docs.vast.ai/api-reference/billing/show-invoices api-reference/openapi.json get /api/v0/users/{user_id}/invoices/ This endpoint retrieves billing history reports for the authenticated user, including charges and credits. CLI Usage: `vastai show invoices` # attach ssh-key Source: https://docs.vast.ai/api-reference/instances/attach-ssh-key api-reference/openapi.json post /api/v0/instances/{id}/ssh/ Attaches an SSH key to the specified instance, allowing SSH access using the provided key. CLI Usage: `vastai attach ssh ` # cancel copy Source: https://docs.vast.ai/api-reference/instances/cancel-copy api-reference/openapi.json delete /api/v0/commands/copy_direct/ Cancel a remote copy operation specified by the destination ID (dst_id). CLI Usage: `vastai cancel copy --dst_id ` # cancel sync Source: https://docs.vast.ai/api-reference/instances/cancel-sync api-reference/openapi.json delete /api/v0/commands/rclone/ Cancels an in-progress remote sync operation identified by the destination instance ID. This operation cannot be resumed once canceled and must be restarted if needed. CLI Usage: `vastai cancel sync --dst_id ` # change bid Source: https://docs.vast.ai/api-reference/instances/change-bid api-reference/openapi.json put /api/v0/instances/bid_price/{id}/ Change the current bid price of an instance to a specified price. CLI Usage: `vastai change bid --price ` # cloud copy Source: https://docs.vast.ai/api-reference/instances/cloud-copy api-reference/openapi.json post /api/v0/commands/rclone/ 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. CLI Usage: `vastai cloud copy [options]` # copy Source: https://docs.vast.ai/api-reference/instances/copy api-reference/openapi.json put /api/v0/commands/copy_direct/ Initiate a remote copy operation to transfer data from one instance to another or between an instance and the local machine. CLI Usage: `vastai copy ` # create instance Source: https://docs.vast.ai/api-reference/instances/create-instance api-reference/openapi.json put /api/v0/asks/{id}/ Creates a new instance by accepting an "ask" contract from a provider. This is the main endpoint for launching new instances on Vast.ai. CLI Usage: `vastai create instance [options]` # destroy instance Source: https://docs.vast.ai/api-reference/instances/destroy-instance api-reference/openapi.json delete /api/v0/instances/{id}/ Destroys/deletes an instance permanently. This is irreversible and will delete all data. CLI Usage: `vastai destroy instance ` # detach ssh-key Source: https://docs.vast.ai/api-reference/instances/detach-ssh-key api-reference/openapi.json delete /api/v0/instances/{id}/ssh/{key}/ Detaches an SSH key from a specified instance, removing SSH access for that key. CLI Usage: `vastai detach ` # execute Source: https://docs.vast.ai/api-reference/instances/execute api-reference/openapi.json put /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 ` # manage instance Source: https://docs.vast.ai/api-reference/instances/manage-instance api-reference/openapi.json put /api/v0/instances/{id}/ Manage instance state and labels. The operation is determined by the request body parameters. CLI Usage: - To stop: `vastai stop instance ` - To start: `vastai start instance ` - To label: `vastai label instance