Search for instance types using custom query
Usage
vastai search offers [--help] [--api-key API_KEY] [--raw] <query>
Arguments
Query to search for. default: ‘external=false rentable=true verified=true’, pass -n to ignore default
Options
-t
string
default:"on-demand"
Show ‘on-demand’, ‘reserved’, or ‘bid’(interruptible) pricing. default: on-demand (alias: --type)
Alias for —type=bid (alias: --interruptible)
Alias for —type=bid (alias: --bid)
Alias for —type=reserved (alias: --reserved)
Alias for —type=on-demand (alias: --on-demand)
Disable default query (alias: --no-default)
Amount of storage to use for pricing, in GiB. default=5.0GiB
Comma-separated list of fields to sort on. postfix field with - to sort desc. ex: -o ‘num_gpus,total_flops-’. default=‘score-’ (alias: --order)
Description
Query syntax:
query = comparison comparison…
comparison = field op value
field = <name of a field>
op = one of: <, <=, ==, !=, >=, >, in, notin
value = <bool, int, float, string> | ‘any’ | [value0, value1, …]
bool: True, False
note: to pass ’>’ and ’<’ on the command line, make sure to use quotes
note: to encode a string query value (ie for gpu_name), replace any spaces ’ ’ with underscore ’_‘
Examples
# search for somewhat reliable single RTX 3090 instances, filter out any duplicates or offers that conflict with our existing stopped instances
vastai search offers 'reliability > 0.98 num_gpus=1 gpu_name=RTX_3090 rented=False'
# search for datacenter gpus with minimal compute_cap and total_flops
vastai search offers 'compute_cap > 610 total_flops > 5 datacenter=True'
# search for reliable 4 gpu offers in Taiwan or Sweden
vastai search offers 'reliability>0.99 num_gpus=4 geolocation in [TW,SE]'
# search for reliable RTX 3090 or 4090 gpus NOT in China or Vietnam
vastai search offers 'reliability>0.99 gpu_name in ["RTX 4090", "RTX 3090"] geolocation notin [CN,VN]'
# search for machines with nvidia drivers 535.86.05 or greater (and various other options)
vastai search offers 'disk_space>146 duration>24 gpu_ram>10 cuda_vers>=12.1 direct_port_count>=2 driver_version >= 535.86.05'
# search for reliable machines with at least 4 gpus, unverified, order by num_gpus, allow conflicts
vastai search offers 'reliability > 0.99 num_gpus>=4 verified=False rented=any' -o 'num_gpus-'
# search for arm64 cpu architecture
vastai search offers 'cpu_arch=arm64'
Available fields:
Name Type Description
bw_nvlink float bandwidth NVLink
compute_cap: int cuda compute capability*100 (ie: 650 for 6.5, 700 for 7.0)
cpu_arch string host machine cpu architecture (e.g. amd64, arm64)
cpu_cores: int # virtual cpus
cpu_ghz: Float # cpu clock speed GHZ
cpu_cores_effective: float # virtual cpus you get
cpu_ram: float system RAM in gigabytes
cuda_vers: float machine max supported cuda version (based on driver version)
datacenter: bool show only datacenter offers
direct_port_count int open ports on host's router
disk_bw: float disk read bandwidth, in MB/s
disk_space: float disk storage space, in GB
dlperf: float DL-perf score (see FAQ for explanation)
dlperf_usd: float DL-perf/$
dph: float $/hour rental cost
driver_version: string machine's nvidia/amd driver version as 3 digit string ex. "535.86.05,"
duration: float max rental duration in days
external: bool show external offers in addition to datacenter offers
flops_usd: float TFLOPs/$
geolocation: string Two letter country code. Works with operators =, !=, in, notin (e.g. geolocation not in ['XV','XZ'])
gpu_arch string host machine gpu architecture (e.g. nvidia, amd)
gpu_max_power float GPU power limit (watts)
gpu_max_temp float GPU temp limit (C)
gpu_mem_bw: float GPU memory bandwidth in GB/s
gpu_name: string GPU model name (no quotes, replace spaces with underscores, ie: RTX_3090 rather than 'RTX 3090')
gpu_ram: float per GPU RAM in GB
gpu_total_ram: float total GPU RAM in GB
gpu_frac: float Ratio of GPUs in the offer to gpus in the system
gpu_display_active: bool True if the GPU has a display attached
has_avx: bool CPU supports AVX instruction set.
id: int instance unique ID
inet_down: float internet download speed in Mb/s
inet_down_cost: float internet download bandwidth cost in $/GB
inet_up: float internet upload speed in Mb/s
inet_up_cost: float internet upload bandwidth cost in $/GB
machine_id int machine id of instance
min_bid: float current minimum bid price in $/hr for interruptible
num_gpus: int # of GPUs
pci_gen: float PCIE generation
pcie_bw: float PCIE bandwidth (CPU to GPU)
reliability: float machine reliability score (see FAQ for explanation)
rentable: bool is the instance currently rentable
rented: bool allow/disallow duplicates and potential conflicts with existing stopped instances
storage_cost: float storage cost in $/GB/month
static_ip: bool is the IP addr static/stable
total_flops: float total TFLOPs from all GPUs
ubuntu_version string host machine ubuntu OS version
verified: bool is the machine verified
vms_enabled: bool is the machine a VM instance
Global Options
The following options are available for all commands:
| Option | Description |
|---|
--url URL | Server REST API URL |
--retry N | Retry limit |
--raw | Output machine-readable JSON |
--explain | Verbose explanation of API calls |
--api-key KEY | API key (defaults to ~/.config/vastai/vast_api_key) |