curl --request GET \
--url https://api.ornn.com/commerce/reservations/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ornn.com/commerce/reservations/usage"
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/commerce/reservations/usage', 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/commerce/reservations/usage",
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/commerce/reservations/usage"
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/commerce/reservations/usage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/commerce/reservations/usage")
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{
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"asOf": "2023-11-07T05:31:56Z",
"bucket": "day",
"unit": "gpu_hour",
"buckets": [
{
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"gpuHours": "436.12"
}
]
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}Get supplied GPU-hours
Returns total reserved GPU-hours on listings supplied by your selected organization, including completed reservations and delisted listings. No buyer identity is returned. Capacity revisions account for GPU additions and removals. Hourly Spot and On-demand reservations count from deployment readiness; never-ready hourly reservations contribute zero. Fixed-term reservations count from their start. Cancelled reservations and CPU capacity are excluded. This measures commercial capacity over time, not GPU activity or invoice amounts. Empty buckets return zero; a failed read returns an error, never a partial total.
curl --request GET \
--url https://api.ornn.com/commerce/reservations/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ornn.com/commerce/reservations/usage"
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/commerce/reservations/usage', 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/commerce/reservations/usage",
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/commerce/reservations/usage"
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/commerce/reservations/usage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/commerce/reservations/usage")
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{
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"asOf": "2023-11-07T05:31:56Z",
"bucket": "day",
"unit": "gpu_hour",
"buckets": [
{
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"gpuHours": "436.12"
}
]
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}Authorizations
Create an organization API key in Account Settings > Developer. Do not send this key to the Kubernetes API server.
Query Parameters
Inclusive UTC start date. The range must not exceed 366 days.
Exclusive UTC end date, after from.
UTC calendar buckets. Weeks start Monday. Edge buckets are clipped to the requested range.
day, week, month Response
GPU-hour buckets. Usage is capped at asOf; the current bucket may be partial.
Was this page helpful?