search network volumes
curl --request POST \
--url https://console.vast.ai/api/v0/network_volumes/search/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"q": {
"verified": {
"eq": true
},
"order": [
[
"storage_cost",
"asc"
]
],
"limit": 123,
"reliability2": {
"gt": 0.98
},
"inet_down": {
"gt": 100
},
"inet_up": {
"gt": 100
},
"geolocation": {
"in": [
"TW",
"SE"
]
},
"disk_bw": {
"gt": 500
},
"duration": {
"gte": 30
},
"storage_cost": {
"lte": 0.1
}
}
}
'import requests
url = "https://console.vast.ai/api/v0/network_volumes/search/"
payload = { "q": {
"verified": { "eq": True },
"order": [["storage_cost", "asc"]],
"limit": 123,
"reliability2": { "gt": 0.98 },
"inet_down": { "gt": 100 },
"inet_up": { "gt": 100 },
"geolocation": { "in": ["TW", "SE"] },
"disk_bw": { "gt": 500 },
"duration": { "gte": 30 },
"storage_cost": { "lte": 0.1 }
} }
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({
q: {
verified: {eq: true},
order: [['storage_cost', 'asc']],
limit: 123,
reliability2: {gt: 0.98},
inet_down: {gt: 100},
inet_up: {gt: 100},
geolocation: {in: ['TW', 'SE']},
disk_bw: {gt: 500},
duration: {gte: 30},
storage_cost: {lte: 0.1}
}
})
};
fetch('https://console.vast.ai/api/v0/network_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/network_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([
'q' => [
'verified' => [
'eq' => true
],
'order' => [
[
'storage_cost',
'asc'
]
],
'limit' => 123,
'reliability2' => [
'gt' => 0.98
],
'inet_down' => [
'gt' => 100
],
'inet_up' => [
'gt' => 100
],
'geolocation' => [
'in' => [
'TW',
'SE'
]
],
'disk_bw' => [
'gt' => 500
],
'duration' => [
'gte' => 30
],
'storage_cost' => [
'lte' => 0.1
]
]
]),
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/network_volumes/search/"
payload := strings.NewReader("{\n \"q\": {\n \"verified\": {\n \"eq\": true\n },\n \"order\": [\n [\n \"storage_cost\",\n \"asc\"\n ]\n ],\n \"limit\": 123,\n \"reliability2\": {\n \"gt\": 0.98\n },\n \"inet_down\": {\n \"gt\": 100\n },\n \"inet_up\": {\n \"gt\": 100\n },\n \"geolocation\": {\n \"in\": [\n \"TW\",\n \"SE\"\n ]\n },\n \"disk_bw\": {\n \"gt\": 500\n },\n \"duration\": {\n \"gte\": 30\n },\n \"storage_cost\": {\n \"lte\": 0.1\n }\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/network_volumes/search/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"q\": {\n \"verified\": {\n \"eq\": true\n },\n \"order\": [\n [\n \"storage_cost\",\n \"asc\"\n ]\n ],\n \"limit\": 123,\n \"reliability2\": {\n \"gt\": 0.98\n },\n \"inet_down\": {\n \"gt\": 100\n },\n \"inet_up\": {\n \"gt\": 100\n },\n \"geolocation\": {\n \"in\": [\n \"TW\",\n \"SE\"\n ]\n },\n \"disk_bw\": {\n \"gt\": 500\n },\n \"duration\": {\n \"gte\": 30\n },\n \"storage_cost\": {\n \"lte\": 0.1\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.vast.ai/api/v0/network_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 \"q\": {\n \"verified\": {\n \"eq\": true\n },\n \"order\": [\n [\n \"storage_cost\",\n \"asc\"\n ]\n ],\n \"limit\": 123,\n \"reliability2\": {\n \"gt\": 0.98\n },\n \"inet_down\": {\n \"gt\": 100\n },\n \"inet_up\": {\n \"gt\": 100\n },\n \"geolocation\": {\n \"in\": [\n \"TW\",\n \"SE\"\n ]\n },\n \"disk_bw\": {\n \"gt\": 500\n },\n \"duration\": {\n \"gte\": 30\n },\n \"storage_cost\": {\n \"lte\": 0.1\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"offers": [
{
"ask_contract_id": 123,
"disk_space": 123,
"inet_up": 123,
"inet_down": 123,
"reliability2": 123,
"verified": true,
"geolocation": "<string>",
"nw_disk_avg_bw": 123,
"nw_disk_max_bw": 123,
"nw_disk_min_bw": 123,
"start_date": 123,
"end_date": 123,
"storage_cost": 123,
"storage_cost_total": 123
}
]
}{
"success": false,
"error": "<string>",
"msg": "<string>"
}{
"success": false,
"error": "<string>",
"msg": "<string>"
}{
"success": false,
"error": "<string>",
"msg": "<string>"
}Network Volumes
search network volumes
Search for available network volume offers with advanced filtering and sorting.
CLI Usage: vastai search network-volumes <query> [--order <field>]
POST
/
api
/
v0
/
network_volumes
/
search
/
search network volumes
curl --request POST \
--url https://console.vast.ai/api/v0/network_volumes/search/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"q": {
"verified": {
"eq": true
},
"order": [
[
"storage_cost",
"asc"
]
],
"limit": 123,
"reliability2": {
"gt": 0.98
},
"inet_down": {
"gt": 100
},
"inet_up": {
"gt": 100
},
"geolocation": {
"in": [
"TW",
"SE"
]
},
"disk_bw": {
"gt": 500
},
"duration": {
"gte": 30
},
"storage_cost": {
"lte": 0.1
}
}
}
'import requests
url = "https://console.vast.ai/api/v0/network_volumes/search/"
payload = { "q": {
"verified": { "eq": True },
"order": [["storage_cost", "asc"]],
"limit": 123,
"reliability2": { "gt": 0.98 },
"inet_down": { "gt": 100 },
"inet_up": { "gt": 100 },
"geolocation": { "in": ["TW", "SE"] },
"disk_bw": { "gt": 500 },
"duration": { "gte": 30 },
"storage_cost": { "lte": 0.1 }
} }
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({
q: {
verified: {eq: true},
order: [['storage_cost', 'asc']],
limit: 123,
reliability2: {gt: 0.98},
inet_down: {gt: 100},
inet_up: {gt: 100},
geolocation: {in: ['TW', 'SE']},
disk_bw: {gt: 500},
duration: {gte: 30},
storage_cost: {lte: 0.1}
}
})
};
fetch('https://console.vast.ai/api/v0/network_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/network_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([
'q' => [
'verified' => [
'eq' => true
],
'order' => [
[
'storage_cost',
'asc'
]
],
'limit' => 123,
'reliability2' => [
'gt' => 0.98
],
'inet_down' => [
'gt' => 100
],
'inet_up' => [
'gt' => 100
],
'geolocation' => [
'in' => [
'TW',
'SE'
]
],
'disk_bw' => [
'gt' => 500
],
'duration' => [
'gte' => 30
],
'storage_cost' => [
'lte' => 0.1
]
]
]),
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/network_volumes/search/"
payload := strings.NewReader("{\n \"q\": {\n \"verified\": {\n \"eq\": true\n },\n \"order\": [\n [\n \"storage_cost\",\n \"asc\"\n ]\n ],\n \"limit\": 123,\n \"reliability2\": {\n \"gt\": 0.98\n },\n \"inet_down\": {\n \"gt\": 100\n },\n \"inet_up\": {\n \"gt\": 100\n },\n \"geolocation\": {\n \"in\": [\n \"TW\",\n \"SE\"\n ]\n },\n \"disk_bw\": {\n \"gt\": 500\n },\n \"duration\": {\n \"gte\": 30\n },\n \"storage_cost\": {\n \"lte\": 0.1\n }\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/network_volumes/search/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"q\": {\n \"verified\": {\n \"eq\": true\n },\n \"order\": [\n [\n \"storage_cost\",\n \"asc\"\n ]\n ],\n \"limit\": 123,\n \"reliability2\": {\n \"gt\": 0.98\n },\n \"inet_down\": {\n \"gt\": 100\n },\n \"inet_up\": {\n \"gt\": 100\n },\n \"geolocation\": {\n \"in\": [\n \"TW\",\n \"SE\"\n ]\n },\n \"disk_bw\": {\n \"gt\": 500\n },\n \"duration\": {\n \"gte\": 30\n },\n \"storage_cost\": {\n \"lte\": 0.1\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.vast.ai/api/v0/network_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 \"q\": {\n \"verified\": {\n \"eq\": true\n },\n \"order\": [\n [\n \"storage_cost\",\n \"asc\"\n ]\n ],\n \"limit\": 123,\n \"reliability2\": {\n \"gt\": 0.98\n },\n \"inet_down\": {\n \"gt\": 100\n },\n \"inet_up\": {\n \"gt\": 100\n },\n \"geolocation\": {\n \"in\": [\n \"TW\",\n \"SE\"\n ]\n },\n \"disk_bw\": {\n \"gt\": 500\n },\n \"duration\": {\n \"gte\": 30\n },\n \"storage_cost\": {\n \"lte\": 0.1\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"offers": [
{
"ask_contract_id": 123,
"disk_space": 123,
"inet_up": 123,
"inet_down": 123,
"reliability2": 123,
"verified": true,
"geolocation": "<string>",
"nw_disk_avg_bw": 123,
"nw_disk_max_bw": 123,
"nw_disk_min_bw": 123,
"start_date": 123,
"end_date": 123,
"storage_cost": 123,
"storage_cost_total": 123
}
]
}{
"success": false,
"error": "<string>",
"msg": "<string>"
}{
"success": false,
"error": "<string>",
"msg": "<string>"
}{
"success": false,
"error": "<string>",
"msg": "<string>"
}⌘I