curl --request GET \
--url https://data-api.compute-index.com/v2/gpu/rental/indexes/metadata \
--header 'Authorization: Bearer <token>'import requests
url = "https://data-api.compute-index.com/v2/gpu/rental/indexes/metadata"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://data-api.compute-index.com/v2/gpu/rental/indexes/metadata', 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://data-api.compute-index.com/v2/gpu/rental/indexes/metadata",
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://data-api.compute-index.com/v2/gpu/rental/indexes/metadata"
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://data-api.compute-index.com/v2/gpu/rental/indexes/metadata")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://data-api.compute-index.com/v2/gpu/rental/indexes/metadata")
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{
"data_type": "prices",
"history_starts_at": "2020-01-01",
"data": {
"index_units": "usd_per_gpu_per_hr",
"indices": [
{
"id": "example-index",
"index_type": "daily-blended",
"row_type": "daily",
"asset": "rental",
"tenor": "1y",
"publication": "daily",
"interval": "P1D",
"title": "Example index",
"description": "An example index.",
"gpu_family": "hopper",
"gpu_group": "h100",
"region_group": "US",
"contract_type": "combined",
"vendor_category": "neocloud",
"source": "compute-index"
}
]
}
}{
"status": 401,
"title": "Unauthorized",
"detail": "Missing or invalid bearer token.",
"code": "unauthenticated",
"request_id": "01JQ2X8N4T6V9WZ0ABCD"
}{
"status": 403,
"title": "Forbidden",
"detail": "The token does not carry the scopes this endpoint requires.",
"code": "insufficient_entitlement",
"request_id": "01JQ2X8N4T6V9WZ0ABCD"
}{
"status": 404,
"title": "Not Found",
"detail": "No such resource, or none you are entitled to see.",
"code": "not_found",
"request_id": "01JQ2X8N4T6V9WZ0ABCD"
}{
"status": 422,
"title": "Unprocessable Content",
"detail": "A parameter failed validation.",
"code": "validation_failed",
"request_id": "01JQ2X8N4T6V9WZ0ABCD"
}{
"status": 429,
"title": "Too Many Requests",
"detail": "Rate limit exceeded; see the X-RateLimit-* headers.",
"code": "rate_limited",
"request_id": "01JQ2X8N4T6V9WZ0ABCD"
}GPU Rental Indexes: Metadata
Published GPU price indices, daily and intraday, one index per request.
Returns the values you can filter this data by, what it covers, and how far back you are able to read it, in history_starts_at.
This is the best first call for any data type: it tells you what a query will accept before you write one. It is not paged.
curl --request GET \
--url https://data-api.compute-index.com/v2/gpu/rental/indexes/metadata \
--header 'Authorization: Bearer <token>'import requests
url = "https://data-api.compute-index.com/v2/gpu/rental/indexes/metadata"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://data-api.compute-index.com/v2/gpu/rental/indexes/metadata', 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://data-api.compute-index.com/v2/gpu/rental/indexes/metadata",
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://data-api.compute-index.com/v2/gpu/rental/indexes/metadata"
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://data-api.compute-index.com/v2/gpu/rental/indexes/metadata")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://data-api.compute-index.com/v2/gpu/rental/indexes/metadata")
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{
"data_type": "prices",
"history_starts_at": "2020-01-01",
"data": {
"index_units": "usd_per_gpu_per_hr",
"indices": [
{
"id": "example-index",
"index_type": "daily-blended",
"row_type": "daily",
"asset": "rental",
"tenor": "1y",
"publication": "daily",
"interval": "P1D",
"title": "Example index",
"description": "An example index.",
"gpu_family": "hopper",
"gpu_group": "h100",
"region_group": "US",
"contract_type": "combined",
"vendor_category": "neocloud",
"source": "compute-index"
}
]
}
}{
"status": 401,
"title": "Unauthorized",
"detail": "Missing or invalid bearer token.",
"code": "unauthenticated",
"request_id": "01JQ2X8N4T6V9WZ0ABCD"
}{
"status": 403,
"title": "Forbidden",
"detail": "The token does not carry the scopes this endpoint requires.",
"code": "insufficient_entitlement",
"request_id": "01JQ2X8N4T6V9WZ0ABCD"
}{
"status": 404,
"title": "Not Found",
"detail": "No such resource, or none you are entitled to see.",
"code": "not_found",
"request_id": "01JQ2X8N4T6V9WZ0ABCD"
}{
"status": 422,
"title": "Unprocessable Content",
"detail": "A parameter failed validation.",
"code": "validation_failed",
"request_id": "01JQ2X8N4T6V9WZ0ABCD"
}{
"status": 429,
"title": "Too Many Requests",
"detail": "Rate limit exceeded; see the X-RateLimit-* headers.",
"code": "rate_limited",
"request_id": "01JQ2X8N4T6V9WZ0ABCD"
}id of each entry is what the data endpoints take, and row_type tells you the shape of the
rows you will get back — daily or intraday.gpu_family, gpu_group, region_group), its
publication interval as an ISO-8601 duration (P1D, PT30M), and source — compute-index
for indices we compute, gx for those administered by General Index, whose points carry no
p5/p95 envelope.
Example
curl -H "Authorization: Bearer $TOKEN" \
"https://data-api.compute-index.com/v2/gpu/rental/indexes/metadata"
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
Successful Response
The data type this vocabulary describes.
"prices"
The caller's licensed history floor for this type, as an ISO date. Null means unrestricted — either the caller has no floor, or this type is a published series that is not floor-bound. Reported here so a client can discover its own entitlement in one call rather than by overshooting a window and reading the clamp.
"2020-01-01"
What you can ask this data type for.
indices lists the indices you hold, and is empty if you hold none.
Show child attributes
Show child attributes