Skip to main content
Search for instance types using custom query

Usage

vastai search offers [--help] [--api-key API_KEY] [--raw] <query>

Arguments

query
string
required
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)
-i
string
Alias for --type=bid (alias: --interruptible)
-b
string
Alias for --type=bid (alias: --bid)
-r
string
Alias for --type=reserved (alias: --reserved)
-d
string
Alias for --type=on-demand (alias: --on-demand)
-n
boolean
Disable default query (alias: --no-default)
--new
boolean
New search exp
--limit
integer
--storage
number
default:"5.0"
Amount of storage to use for pricing, in GiB. default=5.0GiB
-o
string
default:"score-"
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
  • Wrap > and < in quotes on the command line
  • For string values (e.g. gpu_name), replace spaces with underscores: RTX_3090 not RTX 3090

Examples

# reliable single RTX 3090, no conflicts with stopped instances
vastai search offers 'reliability > 0.98 num_gpus=1 gpu_name=RTX_3090 rented=False'

# datacenter GPUs with minimum compute capability and TFLOPs
vastai search offers 'compute_cap > 610 total_flops > 5 datacenter=True'

# reliable 4-GPU offers in Taiwan or Sweden
vastai search offers 'reliability>0.99 num_gpus=4 geolocation in [TW,SE]'

# reliable RTX 3090 or 4090 NOT in China or Vietnam
vastai search offers 'reliability>0.99 gpu_name in ["RTX 4090", "RTX 3090"] geolocation notin [CN,VN]'

# nvidia driver 535.86.05 or greater with various constraints
vastai search offers 'disk_space>146 duration>24 gpu_ram>10 cuda_vers>=12.1 direct_port_count>=2 driver_version >= 535.86.05'

# reliable 4+ GPU offers, unverified allowed, sort by num_gpus desc
vastai search offers 'reliability > 0.99  num_gpus>=4 verified=False rented=any' -o 'num_gpus-'

# arm64 cpu architecture only
vastai search offers 'cpu_arch=arm64'

Available Fields

FieldTypeDescription
bw_nvlinkfloatbandwidth NVLink
compute_capintCUDA compute capability ×100 (e.g. 650 for 6.5, 700 for 7.0)
cpu_archstringhost machine cpu architecture (e.g. amd64, arm64)
cpu_coresintnumber of virtual cpus
cpu_ghzfloatcpu clock speed in GHz
cpu_cores_effectivefloatvirtual cpus you get
cpu_ramfloatsystem RAM in gigabytes
cuda_versfloatmachine max supported cuda version (based on driver version)
datacenterboolshow only datacenter offers
direct_port_countintopen ports on host’s router
disk_bwfloatdisk read bandwidth, in MB/s
disk_spacefloatdisk storage space, in GB
dlperffloatDL-perf score (see FAQ for explanation)
dlperf_usdfloatDL-perf per dollar
dphfloat$/hour rental cost
driver_versionstringmachine’s nvidia/amd driver version as 3 digit string ex. “535.86.05”
durationfloatmax rental duration in days
externalboolshow external offers in addition to datacenter offers
flops_usdfloatTFLOPs per dollar
geolocationstringtwo letter country code; supports =, !=, in, notin
gpu_archstringhost machine gpu architecture (e.g. nvidia, amd)
gpu_max_powerfloatGPU power limit (watts)
gpu_max_tempfloatGPU temp limit (°C)
gpu_mem_bwfloatGPU memory bandwidth in GB/s
gpu_namestringGPU model name (no quotes, replace spaces with underscores, ie: RTX_3090)
gpu_ramfloatper GPU RAM in GB
gpu_total_ramfloattotal GPU RAM in GB
gpu_fracfloatratio of GPUs in the offer to GPUs in the system
gpu_display_activeboolTrue if the GPU has a display attached
has_avxboolCPU supports AVX instruction set
idintinstance unique ID
inet_downfloatinternet download speed in Mb/s
inet_down_costfloatinternet download bandwidth cost in $/GB
inet_upfloatinternet upload speed in Mb/s
inet_up_costfloatinternet upload bandwidth cost in $/GB
machine_idintmachine id of instance
min_bidfloatcurrent minimum bid price in $/hr for interruptible
num_gpusintnumber of GPUs
pci_genfloatPCIE generation
pcie_bwfloatPCIE bandwidth (CPU to GPU)
reliabilityfloatmachine reliability score (see FAQ for explanation)
rentableboolis the instance currently rentable
rentedboolallow/disallow duplicates and potential conflicts with existing stopped instances
storage_costfloatstorage cost in $/GB/month
static_ipboolis the IP addr static/stable
total_flopsfloattotal TFLOPs from all GPUs
ubuntu_versionstringhost machine ubuntu OS version
verifiedboolis the machine verified
vms_enabledboolis the machine a VM instance

Global Options

The following options are available for all commands:
OptionDescription
--url URLServer REST API URL
--retry NRetry limit
--rawOutput machine-readable JSON
--explainVerbose explanation of API calls
--api-key KEYAPI key (defaults to ~/.config/vastai/vast_api_key)