curl --request POST \
--url https://console.vast.ai/api/v0/volumes/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"disk_space": {
"gte": 50
},
"reliability": {
"gte": 0.98
},
"order": [
[
"storage_total_cost",
"asc"
]
],
"limit": 64
}
'import requests
url = "https://console.vast.ai/api/v0/volumes/search"
payload = {
"disk_space": { "gte": 50 },
"reliability": { "gte": 0.98 },
"order": [["storage_total_cost", "asc"]],
"limit": 64
}
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({
disk_space: {gte: 50},
reliability: {gte: 0.98},
order: [['storage_total_cost', 'asc']],
limit: 64
})
};
fetch('https://console.vast.ai/api/v0/volumes/search', 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/volumes/search",
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([
'disk_space' => [
'gte' => 50
],
'reliability' => [
'gte' => 0.98
],
'order' => [
[
'storage_total_cost',
'asc'
]
],
'limit' => 64
]),
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/volumes/search"
payload := strings.NewReader("{\n \"disk_space\": {\n \"gte\": 50\n },\n \"reliability\": {\n \"gte\": 0.98\n },\n \"order\": [\n [\n \"storage_total_cost\",\n \"asc\"\n ]\n ],\n \"limit\": 64\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/volumes/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"disk_space\": {\n \"gte\": 50\n },\n \"reliability\": {\n \"gte\": 0.98\n },\n \"order\": [\n [\n \"storage_total_cost\",\n \"asc\"\n ]\n ],\n \"limit\": 64\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.vast.ai/api/v0/volumes/search")
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 \"disk_space\": {\n \"gte\": 50\n },\n \"reliability\": {\n \"gte\": 0.98\n },\n \"order\": [\n [\n \"storage_total_cost\",\n \"asc\"\n ]\n ],\n \"limit\": 64\n}"
response = http.request(request)
puts response.read_body{
"offers": [
{
"id": 123,
"ask_contract_id": 123,
"bundle_id": 123,
"disk_space": 123,
"storage_cost": 123,
"storage_total_cost": 123,
"reliability": 123,
"geolocation": "<string>",
"host_id": 123,
"verification": "<string>",
"inet_down": 123,
"inet_up": 123,
"cpu_arch": "<string>",
"disk_bw": 123,
"machine_id": 123
}
]
}{
"error": "<string>",
"msg": "<string>"
}Search Volume Offers
Search available disk volume offers using a JSON query body; returns offers with free disk space.
curl --request POST \
--url https://console.vast.ai/api/v0/volumes/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"disk_space": {
"gte": 50
},
"reliability": {
"gte": 0.98
},
"order": [
[
"storage_total_cost",
"asc"
]
],
"limit": 64
}
'import requests
url = "https://console.vast.ai/api/v0/volumes/search"
payload = {
"disk_space": { "gte": 50 },
"reliability": { "gte": 0.98 },
"order": [["storage_total_cost", "asc"]],
"limit": 64
}
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({
disk_space: {gte: 50},
reliability: {gte: 0.98},
order: [['storage_total_cost', 'asc']],
limit: 64
})
};
fetch('https://console.vast.ai/api/v0/volumes/search', 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/volumes/search",
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([
'disk_space' => [
'gte' => 50
],
'reliability' => [
'gte' => 0.98
],
'order' => [
[
'storage_total_cost',
'asc'
]
],
'limit' => 64
]),
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/volumes/search"
payload := strings.NewReader("{\n \"disk_space\": {\n \"gte\": 50\n },\n \"reliability\": {\n \"gte\": 0.98\n },\n \"order\": [\n [\n \"storage_total_cost\",\n \"asc\"\n ]\n ],\n \"limit\": 64\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/volumes/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"disk_space\": {\n \"gte\": 50\n },\n \"reliability\": {\n \"gte\": 0.98\n },\n \"order\": [\n [\n \"storage_total_cost\",\n \"asc\"\n ]\n ],\n \"limit\": 64\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.vast.ai/api/v0/volumes/search")
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 \"disk_space\": {\n \"gte\": 50\n },\n \"reliability\": {\n \"gte\": 0.98\n },\n \"order\": [\n [\n \"storage_total_cost\",\n \"asc\"\n ]\n ],\n \"limit\": 64\n}"
response = http.request(request)
puts response.read_body{
"offers": [
{
"id": 123,
"ask_contract_id": 123,
"bundle_id": 123,
"disk_space": 123,
"storage_cost": 123,
"storage_total_cost": 123,
"reliability": 123,
"geolocation": "<string>",
"host_id": 123,
"verification": "<string>",
"inet_down": 123,
"inet_up": 123,
"cpu_arch": "<string>",
"disk_bw": 123,
"machine_id": 123
}
]
}{
"error": "<string>",
"msg": "<string>"
}Authorizations
API key must be provided in the Authorization header
Query Parameters
Query parameters for filtering volume search results
Show child attributes
Show child attributes
Body
The raw search query object (not wrapped in a "q" key).
The body is the search query object itself: each key is a volume offer field name paired with a filter expression {operator: value} (operators: eq, neq, gt, gte, lt, lte, in, notin), plus the special keys documented below. Volume-relevant fields include disk_space, storage_cost, duration, reliability, inet_up and inet_down.
Maximum number of offers to return.
64
Sort order: list of [column, direction] pairs, e.g. [["dph_total", "asc"]].
[["dph_total", "asc"]]
Offer type to search.
on-demand, bid, reserved "on-demand"
Filter expression for an offer field: {operator: value}, e.g. {"gte": 2} or {"in": ["RTX 4090", "RTX 5090"]}.
Show child attributes
Show child attributes
Response
Matching volume offers: {"offers": [...]} with keys including id, storage_cost, disk_space, reliability, etc.
Array of volume offer objects
Show child attributes
Show child attributes