cURL
curl "https://api.ornnai.com/api/gpu/H100%20SXM/history?datetime=2026-05-30T16:00:00" \
-H "Authorization: Bearer YOUR_API_KEY"import requests
resp = requests.get(
"https://api.ornnai.com/api/gpu/H100 SXM/history",
params={"datetime": "2026-05-30T16:00:00"},
headers={"Authorization": "Bearer YOUR_API_KEY"},
)
const res = await fetch(
"https://api.ornnai.com/api/gpu/H100 SXM/history?datetime=2026-05-30T16:00:00",
{ headers: { Authorization: "Bearer YOUR_API_KEY" } },
);
const data = await res.json();
<?php
$url = "https://api.ornnai.com/api/gpu/" . rawurlencode("H100 SXM")
. "/history?datetime=2026-05-30T16:00:00";
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer YOUR_API_KEY"],
]);
$data = json_decode(curl_exec($ch), true);
package main
import (
"io"
"net/http"
"net/url"
)
func main() {
endpoint := "https://api.ornnai.com/api/gpu/" + url.PathEscape("H100 SXM") +
"/history?datetime=2026-05-30T16:00:00"
req, _ := http.NewRequest("GET", endpoint, nil)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
_ = body
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder(
URI.create("https://api.ornnai.com/api/gpu/H100%20SXM/history?datetime=2026-05-30T16:00:00"))
.header("Authorization", "Bearer YOUR_API_KEY")
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
require "net/http"
require "json"
uri = URI("https://api.ornnai.com/api/gpu/H100%20SXM/history?datetime=2026-05-30T16:00:00")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)
{
"success": true,
"query": {
"gpu_name": "H100 SXM",
"region": "",
"requested_datetime": "2026-01-01T00:00:00.000Z"
},
"data": {
"gpu_name": "H100 SXM",
"region": "global",
"recorded_at": "2026-01-01T00:00:00.000Z",
"index_value": 2,
"data_granularity": "hourly",
"time_difference": {
"seconds": 0,
"description": "0 minutes",
"is_exact": false
}
}
}{
"error": "Bad request",
"message": "Invalid GPU type. Allowed: H100 SXM, H200, A100 SXM4, RTX 5090, B200, RTX PRO 6000 WS"
}{
"error": "Unauthorized",
"message": "API key required. Use Authorization: Bearer YOUR_API_KEY"
}Get index value nearest a timestamp
Returns the index value of the record nearest the requested time, with the gap reported in time_difference.
GET
/
api
/
gpu
/
{gpuName}
/
history
cURL
curl "https://api.ornnai.com/api/gpu/H100%20SXM/history?datetime=2026-05-30T16:00:00" \
-H "Authorization: Bearer YOUR_API_KEY"import requests
resp = requests.get(
"https://api.ornnai.com/api/gpu/H100 SXM/history",
params={"datetime": "2026-05-30T16:00:00"},
headers={"Authorization": "Bearer YOUR_API_KEY"},
)
const res = await fetch(
"https://api.ornnai.com/api/gpu/H100 SXM/history?datetime=2026-05-30T16:00:00",
{ headers: { Authorization: "Bearer YOUR_API_KEY" } },
);
const data = await res.json();
<?php
$url = "https://api.ornnai.com/api/gpu/" . rawurlencode("H100 SXM")
. "/history?datetime=2026-05-30T16:00:00";
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer YOUR_API_KEY"],
]);
$data = json_decode(curl_exec($ch), true);
package main
import (
"io"
"net/http"
"net/url"
)
func main() {
endpoint := "https://api.ornnai.com/api/gpu/" + url.PathEscape("H100 SXM") +
"/history?datetime=2026-05-30T16:00:00"
req, _ := http.NewRequest("GET", endpoint, nil)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
_ = body
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder(
URI.create("https://api.ornnai.com/api/gpu/H100%20SXM/history?datetime=2026-05-30T16:00:00"))
.header("Authorization", "Bearer YOUR_API_KEY")
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
require "net/http"
require "json"
uri = URI("https://api.ornnai.com/api/gpu/H100%20SXM/history?datetime=2026-05-30T16:00:00")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)
{
"success": true,
"query": {
"gpu_name": "H100 SXM",
"region": "",
"requested_datetime": "2026-01-01T00:00:00.000Z"
},
"data": {
"gpu_name": "H100 SXM",
"region": "global",
"recorded_at": "2026-01-01T00:00:00.000Z",
"index_value": 2,
"data_granularity": "hourly",
"time_difference": {
"seconds": 0,
"description": "0 minutes",
"is_exact": false
}
}
}{
"error": "Bad request",
"message": "Invalid GPU type. Allowed: H100 SXM, H200, A100 SXM4, RTX 5090, B200, RTX PRO 6000 WS"
}{
"error": "Unauthorized",
"message": "API key required. Use Authorization: Bearer YOUR_API_KEY"
}Overview
Returns the index value of the record nearest the requested time, with the gap reported in time_difference.Authorizations
API key passed as a Bearer token. Create one in the dashboard.
Path Parameters
A supported GPU model. URL-encode spaces.
Available options:
H100 SXM, H200, A100 SXM4, B200, RTX 5090, RTX PRO 6000 WS Example:
"H100 SXM"
Query Parameters
YYYY-MM-DD HH:MM:SS or ISO 8601.
Example:
"2026-05-30T16:00:00"
Response
Nearest record.
⌘I

