search offers
curl --request POST \
--url https://console.vast.ai/api/v0/bundles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"limit": 100,
"type": "on-demand",
"verified": {
"eq": true
},
"rentable": {
"eq": true
},
"rented": {
"eq": false
}
}
'import requests
url = "https://console.vast.ai/api/v0/bundles"
payload = {
"limit": 100,
"type": "on-demand",
"verified": { "eq": True },
"rentable": { "eq": True },
"rented": { "eq": False }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
limit: 100,
type: 'on-demand',
verified: {eq: true},
rentable: {eq: true},
rented: {eq: false}
})
};
fetch('https://console.vast.ai/api/v0/bundles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://console.vast.ai/api/v0/bundles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'limit' => 100,
'type' => 'on-demand',
'verified' => [
'eq' => true
],
'rentable' => [
'eq' => true
],
'rented' => [
'eq' => false
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://console.vast.ai/api/v0/bundles"
payload := strings.NewReader("{\n \"limit\": 100,\n \"type\": \"on-demand\",\n \"verified\": {\n \"eq\": true\n },\n \"rentable\": {\n \"eq\": true\n },\n \"rented\": {\n \"eq\": false\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://console.vast.ai/api/v0/bundles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"limit\": 100,\n \"type\": \"on-demand\",\n \"verified\": {\n \"eq\": true\n },\n \"rentable\": {\n \"eq\": true\n },\n \"rented\": {\n \"eq\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.vast.ai/api/v0/bundles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"limit\": 100,\n \"type\": \"on-demand\",\n \"verified\": {\n \"eq\": true\n },\n \"rentable\": {\n \"eq\": true\n },\n \"rented\": {\n \"eq\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"offers": {
"id": 12345678,
"ask_contract_id": 12345678,
"bundle_id": 987654321,
"bundled_results": null,
"bw_nvlink": 0,
"compute_cap": 900,
"cpu_arch": "amd64",
"cpu_cores": 64,
"cpu_cores_effective": 32,
"cpu_ghz": 2.99,
"cpu_name": "QuantumX 128-Core Processor",
"cpu_ram": 65536,
"credit_discount_max": 0.15,
"cuda_max_good": 11.2,
"direct_port_count": 42,
"disk_bw": 1234.5,
"disk_name": "HYPERDISK 8TB",
"disk_space": 2048.5,
"dlperf": 222.22,
"dlperf_per_dphtotal": 333.33,
"dph_base": 0.123456,
"dph_total": 0.234567,
"driver_version": "999.99.99",
"driver_vers": 999999999,
"duration": 1234567.89,
"end_date": 1893456000,
"external": null,
"flops_per_dphtotal": 444.44,
"geolocation": "Atlantis, AT",
"geolocode": 42424242,
"gpu_arch": "nvidia",
"gpu_display_active": false,
"gpu_frac": 0.75,
"gpu_ids": [
1111,
2222
],
"gpu_lanes": 16,
"gpu_mem_bw": 888.8,
"gpu_name": "Imaginary RTX 9999",
"gpu_ram": 24576,
"gpu_total_ram": 49152,
"gpu_max_power": 450,
"gpu_max_temp": 42,
"has_avx": 1,
"host_id": 55555,
"hosting_type": 0,
"hostname": null,
"inet_down": 9876.5,
"inet_down_cost": 0.00123,
"inet_up": 8765.4,
"inet_up_cost": 0.00456,
"is_bid": false,
"logo": "/static/logos/fake_logo.png",
"machine_id": 88888,
"min_bid": 0.111111,
"mobo_name": "FANTASY-MOBO-2025",
"num_gpus": 4,
"os_version": "42.42",
"pci_gen": 6,
"pcie_bw": 99.9,
"public_ipaddr": "203.0.113.42",
"reliability": 0.9999,
"reliability_mult": 0.8888,
"rentable": true,
"rented": false,
"score": 1234.5678,
"start_date": 1893450000.5,
"static_ip": true,
"storage_cost": 0.987654,
"storage_total_cost": 0.123456,
"total_flops": 999.99,
"verification": "verified",
"vericode": 1,
"vram_costperhour": 0.009876,
"webpage": null,
"vms_enabled": false,
"expected_reliability": 0.5,
"is_vm_deverified": false,
"resource_type": "gpu",
"cluster_id": null,
"avail_vol_ask_id": 333333,
"avail_vol_dph": 0.000321,
"avail_vol_size": 4096,
"nw_disk_min_bw": null,
"nw_disk_max_bw": null,
"nw_disk_avg_bw": null,
"rn": 1,
"dph_total_adj": 0.345678,
"reliability2": 0.9999,
"discount_rate": 0.05,
"discounted_hourly": 0.01,
"discounted_dph_total": 0.224567,
"search": {
"gpuCostPerHour": 0.123456,
"diskHour": 0.123456,
"totalHour": 0.234567,
"discountTotalHour": 0.01,
"discountedTotalPerHour": 0.224567
},
"instance": {
"gpuCostPerHour": 0.01,
"diskHour": 0.02,
"totalHour": 0.03,
"discountTotalHour": 0.001,
"discountedTotalPerHour": 0.029
},
"time_remaining": "",
"time_remaining_isbid": "",
"internet_up_cost_per_tb": 1.23,
"internet_down_cost_per_tb": 4.56
}
}{
"error": "invalid_request",
"msg": "Invalid json body"
}{
"error": "<string>",
"msg": "Invalid user key"
}Search
search offers
Search for available GPU machine offers with advanced filtering and sorting.
Each filter parameter (such as verified, gpu_name, num_gpus, etc.) should be an object specifying the operator and value you want to match.
Filter operators:
| Operator | Meaning | Example |
|---|---|---|
eq | Equal to | { "eq": true } |
neq | Not equal to | { "neq": false } |
gt | Greater than | { "gt": 0.99 } |
lt | Less than | { "lt": 10000 } |
gte | Greater than or equal | { "gte": 4 } |
lte | Less than or equal | { "lte": 8 } |
in | Value is in a list | { "in": ["RTX_3090", "RTX_4090"] } |
notin | Value is not in a list | { "notin": ["TW", "SE"] } |
CLI Usage: vastai search offers 'reliability > 0.99 num_gpus>=4' --order=dph_total
POST
/
api
/
v0
/
bundles
search offers
curl --request POST \
--url https://console.vast.ai/api/v0/bundles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"limit": 100,
"type": "on-demand",
"verified": {
"eq": true
},
"rentable": {
"eq": true
},
"rented": {
"eq": false
}
}
'import requests
url = "https://console.vast.ai/api/v0/bundles"
payload = {
"limit": 100,
"type": "on-demand",
"verified": { "eq": True },
"rentable": { "eq": True },
"rented": { "eq": False }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
limit: 100,
type: 'on-demand',
verified: {eq: true},
rentable: {eq: true},
rented: {eq: false}
})
};
fetch('https://console.vast.ai/api/v0/bundles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://console.vast.ai/api/v0/bundles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'limit' => 100,
'type' => 'on-demand',
'verified' => [
'eq' => true
],
'rentable' => [
'eq' => true
],
'rented' => [
'eq' => false
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://console.vast.ai/api/v0/bundles"
payload := strings.NewReader("{\n \"limit\": 100,\n \"type\": \"on-demand\",\n \"verified\": {\n \"eq\": true\n },\n \"rentable\": {\n \"eq\": true\n },\n \"rented\": {\n \"eq\": false\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://console.vast.ai/api/v0/bundles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"limit\": 100,\n \"type\": \"on-demand\",\n \"verified\": {\n \"eq\": true\n },\n \"rentable\": {\n \"eq\": true\n },\n \"rented\": {\n \"eq\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.vast.ai/api/v0/bundles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"limit\": 100,\n \"type\": \"on-demand\",\n \"verified\": {\n \"eq\": true\n },\n \"rentable\": {\n \"eq\": true\n },\n \"rented\": {\n \"eq\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"offers": {
"id": 12345678,
"ask_contract_id": 12345678,
"bundle_id": 987654321,
"bundled_results": null,
"bw_nvlink": 0,
"compute_cap": 900,
"cpu_arch": "amd64",
"cpu_cores": 64,
"cpu_cores_effective": 32,
"cpu_ghz": 2.99,
"cpu_name": "QuantumX 128-Core Processor",
"cpu_ram": 65536,
"credit_discount_max": 0.15,
"cuda_max_good": 11.2,
"direct_port_count": 42,
"disk_bw": 1234.5,
"disk_name": "HYPERDISK 8TB",
"disk_space": 2048.5,
"dlperf": 222.22,
"dlperf_per_dphtotal": 333.33,
"dph_base": 0.123456,
"dph_total": 0.234567,
"driver_version": "999.99.99",
"driver_vers": 999999999,
"duration": 1234567.89,
"end_date": 1893456000,
"external": null,
"flops_per_dphtotal": 444.44,
"geolocation": "Atlantis, AT",
"geolocode": 42424242,
"gpu_arch": "nvidia",
"gpu_display_active": false,
"gpu_frac": 0.75,
"gpu_ids": [
1111,
2222
],
"gpu_lanes": 16,
"gpu_mem_bw": 888.8,
"gpu_name": "Imaginary RTX 9999",
"gpu_ram": 24576,
"gpu_total_ram": 49152,
"gpu_max_power": 450,
"gpu_max_temp": 42,
"has_avx": 1,
"host_id": 55555,
"hosting_type": 0,
"hostname": null,
"inet_down": 9876.5,
"inet_down_cost": 0.00123,
"inet_up": 8765.4,
"inet_up_cost": 0.00456,
"is_bid": false,
"logo": "/static/logos/fake_logo.png",
"machine_id": 88888,
"min_bid": 0.111111,
"mobo_name": "FANTASY-MOBO-2025",
"num_gpus": 4,
"os_version": "42.42",
"pci_gen": 6,
"pcie_bw": 99.9,
"public_ipaddr": "203.0.113.42",
"reliability": 0.9999,
"reliability_mult": 0.8888,
"rentable": true,
"rented": false,
"score": 1234.5678,
"start_date": 1893450000.5,
"static_ip": true,
"storage_cost": 0.987654,
"storage_total_cost": 0.123456,
"total_flops": 999.99,
"verification": "verified",
"vericode": 1,
"vram_costperhour": 0.009876,
"webpage": null,
"vms_enabled": false,
"expected_reliability": 0.5,
"is_vm_deverified": false,
"resource_type": "gpu",
"cluster_id": null,
"avail_vol_ask_id": 333333,
"avail_vol_dph": 0.000321,
"avail_vol_size": 4096,
"nw_disk_min_bw": null,
"nw_disk_max_bw": null,
"nw_disk_avg_bw": null,
"rn": 1,
"dph_total_adj": 0.345678,
"reliability2": 0.9999,
"discount_rate": 0.05,
"discounted_hourly": 0.01,
"discounted_dph_total": 0.224567,
"search": {
"gpuCostPerHour": 0.123456,
"diskHour": 0.123456,
"totalHour": 0.234567,
"discountTotalHour": 0.01,
"discountedTotalPerHour": 0.224567
},
"instance": {
"gpuCostPerHour": 0.01,
"diskHour": 0.02,
"totalHour": 0.03,
"discountTotalHour": 0.001,
"discountedTotalPerHour": 0.029
},
"time_remaining": "",
"time_remaining_isbid": "",
"internet_up_cost_per_tb": 1.23,
"internet_down_cost_per_tb": 4.56
}
}{
"error": "invalid_request",
"msg": "Invalid json body"
}{
"error": "<string>",
"msg": "Invalid user key"
}Body
application/json