vastailisted
Install: claude install-skill Axect/skills
# Vast.ai CLI Skill
This skill helps you use the `vastai` CLI to manage GPU cloud resources on the Vast.ai marketplace. Vast.ai is an open marketplace for GPU compute — you can search for available machines, rent them, deploy Docker containers, transfer data, and manage billing, all from the command line.
## Prerequisites
- **Install**: `pip install vastai` (or `uv pip install vastai`)
- **Authenticate**: Get your API key from https://cloud.vast.ai/cli/ then run:
```bash
vastai set api-key YOUR_API_KEY
```
The key is stored at `~/.vast_api_key`. Never share API keys.
## Core Workflow
The typical workflow is: **Search** -> **Create** -> **Use** -> **Destroy**.
### 1. Search for GPU Offers
```bash
vastai search offers '<query>' -o '<sort_field>'
```
The query uses a simple `field operator value` syntax. Multiple conditions are space-separated (implicit AND).
**Operators**: `>`, `>=`, `<`, `<=`, `=`, `!=`
**Common examples:**
```bash
# Find RTX 4090 machines with 99%+ reliability
vastai search offers 'gpu_name=RTX_4090 reliability>0.99 num_gpus=1'
# Find multi-GPU A100 setups, sorted by price
vastai search offers 'gpu_name=A100_SXM4 num_gpus>=4 reliability>0.98' -o 'dph'
# Find any GPU with 24GB+ VRAM under $0.50/hr
vastai search offers 'gpu_ram>=24 dph<0.5 reliability>0.95' -o 'dph'
# Datacenter-only machines with fast internet
vastai search offers 'datacenter=true inet_down>500 inet_up>500'
```
**Key search fields** (see `references/search-fields.md` for