curl --request GET \
--url https://api.ornn.com/v1/markets/listings/{listingId}/availability \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ornn.com/v1/markets/listings/{listingId}/availability"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ornn.com/v1/markets/listings/{listingId}/availability', 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://api.ornn.com/v1/markets/listings/{listingId}/availability",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ornn.com/v1/markets/listings/{listingId}/availability"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ornn.com/v1/markets/listings/{listingId}/availability")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/markets/listings/{listingId}/availability")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"listingId": "77777777-7777-4777-8777-777777777777",
"windows": [
{
"startsAt": "2026-10-20T00:00:00Z",
"endsAt": "2026-10-21T00:00:00Z",
"gpus": 16,
"nodes": 2
},
{
"startsAt": "2026-10-21T00:00:00Z",
"endsAt": "2026-10-23T00:00:00Z",
"gpus": 12,
"nodes": 1
},
{
"startsAt": "2026-10-23T00:00:00Z",
"endsAt": "2026-11-03T00:00:00Z",
"gpus": 16,
"nodes": 2
}
]
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": {
"code": "listing_not_found",
"message": "Ornn could not find that listing."
}
}{
"detail": {
"code": "invalid_window",
"message": "Choose a window that ends after it starts, in whole seconds."
}
}{
"code": "<string>",
"detail": "<string>"
}Get a listing's free capacity
Returns how many of a listing’s GPUs (vCPUs on a CPU listing), and on how many nodes, are free to book over time, from now (or the listing’s start) until the listing ends. Without an end, a Market listing returns 30 days ahead and a Reserve listing returns far enough ahead for any of its terms. Use it to choose a window before you book or offer. GPUs running Spot VMs count as free, because a booking ends Spot on its GPUs when it starts. Reserve listings return 404 unless your organization is approved or owns the listing.
curl --request GET \
--url https://api.ornn.com/v1/markets/listings/{listingId}/availability \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ornn.com/v1/markets/listings/{listingId}/availability"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ornn.com/v1/markets/listings/{listingId}/availability', 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://api.ornn.com/v1/markets/listings/{listingId}/availability",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ornn.com/v1/markets/listings/{listingId}/availability"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ornn.com/v1/markets/listings/{listingId}/availability")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/markets/listings/{listingId}/availability")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"listingId": "77777777-7777-4777-8777-777777777777",
"windows": [
{
"startsAt": "2026-10-20T00:00:00Z",
"endsAt": "2026-10-21T00:00:00Z",
"gpus": 16,
"nodes": 2
},
{
"startsAt": "2026-10-21T00:00:00Z",
"endsAt": "2026-10-23T00:00:00Z",
"gpus": 12,
"nodes": 1
},
{
"startsAt": "2026-10-23T00:00:00Z",
"endsAt": "2026-11-03T00:00:00Z",
"gpus": 16,
"nodes": 2
}
]
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": {
"code": "listing_not_found",
"message": "Ornn could not find that listing."
}
}{
"detail": {
"code": "invalid_window",
"message": "Choose a window that ends after it starts, in whole seconds."
}
}{
"code": "<string>",
"detail": "<string>"
}Authorizations
Create an organization API key in Account Settings > Developer. Do not send this key to the Kubernetes API server.
Path Parameters
Listing ID (capacityListingId or listingId).
Query Parameters
RFC 3339 time. Start no earlier than this.
RFC 3339 time. End no later than this.
Was this page helpful?