PyPI Install
You can install the latest stable PyPI release with:Text
Github
Alternatively you can get the very latest version directly from github:Text
vast.py
.
Quickstart
In order to authenticate most commands you will need to first login to the vast.ai website and get an api-key. Go to https://cloud.vast.ai/cli/. Copy the command under the heading “Login / Set API Key” and run it. The command will be something like:vastai set api-key xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
where the xxxx...
is a unique api-key (a long hexadecimal number).
Note that if the script is named “vast” in this command on the website and your installed script is named “vast.py” you will need to change the name of the script in the command you run.
The set api-key
command saves your api-key in a hidden file in your home directory.
Do not share your api-keys with anyone as they authenticate commands from your account.
Your default main key allows full access to all commands without limitations, but you can use the CLI to create additional keys with fine-grained access restrictions.
Usage
For the most up to date help, use ‘vast.py —help’. You can then get a list of the available commands. Each command also typically has help documentation:Text
Text
Text
Text
Text
Launching Instances
Text
Text
Get Instance Info
Text
Starting Stopping
Text
Copy Data
Text
Destroy Instances
Text