Get a rental
curl --request GET \
--url https://api.hyperbolic.ai/v2/on-demand/rental \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hyperbolic.ai/v2/on-demand/rental"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hyperbolic.ai/v2/on-demand/rental', 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.hyperbolic.ai/v2/on-demand/rental",
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.hyperbolic.ai/v2/on-demand/rental"
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.hyperbolic.ai/v2/on-demand/rental")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperbolic.ai/v2/on-demand/rental")
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{
"state": "active",
"rental": {
"rentalId": "<string>",
"name": "<string>",
"label": "<string>",
"rentalType": "virtual-machine",
"region": "us-central-1",
"gpuType": "h100",
"gpuCount": 0,
"gpuFormFactor": "sxm5",
"connectionType": "infiniband",
"ethernetVariant": "normal",
"nodes": [
{
"cpuModel": "<string>",
"cpuCount": 123,
"vcpuCount": 123,
"gpuCount": 123,
"ramGb": 123,
"storageGb": 123
}
],
"sshEndpoints": [
{
"host": "<string>",
"port": 123,
"user": "<string>"
}
],
"networkInterfaces": [
{
"publicIp": "<string>",
"privateIp": "<string>"
}
],
"portMappings": [
{
"externalPort": 123,
"internalPort": 123
}
],
"supportsPortForwarding": true,
"exposedPorts": [
123
],
"supportsCustomPorts": true,
"attachedStorage": [
{
"storageVolumeId": "<string>",
"label": "<string>",
"sizeInGb": 0,
"virtualIp": "<string>",
"costPerHourCents": 123
}
],
"supportsAttachedStorage": true,
"monitoringEnabled": true,
"convertToOnDemandOnExpiry": true,
"terminationReason": "<string>",
"currentTerm": {
"effectiveAt": "2025-01-31T12:00:00.000Z",
"termType": "on-demand",
"costPerHour": 123,
"reservedUntil": null,
"reservationEndsAt": null,
"termPeriodDays": null,
"discountPercentage": null,
"originalCostPerHour": null
},
"createdAt": "2025-01-31T12:00:00.000Z",
"updatedAt": "2025-01-31T12:00:00.000Z",
"startedAt": "2025-01-31T12:00:00.000Z",
"terminatedAt": "2025-01-31T12:00:00.000Z",
"userId": "<string>",
"orgId": "<string>",
"createdBy": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"picture": "<string>"
},
"privateCluster": {
"gpuModel": "<string>",
"location": "<string>",
"sshUser": "<string>",
"sshPort": 123,
"nodes": [
{
"role": "login",
"hostname": "<string>",
"publicIp": "<string>",
"privateIp": "<string>"
}
],
"handover": {}
},
"managedCluster": {
"name": "<string>",
"label": "<string>"
},
"status": "Unknown",
"instances": [
{
"instanceRef": "<string>",
"phase": "<string>",
"ssh": "<string>",
"internalIp": "<string>",
"supportsReboot": true,
"actualResources": {
"vcpuCount": 123,
"ramGb": 123,
"gpuCount": 123,
"gpuMemoryGb": 123,
"gpuModel": "<string>",
"scratchDiskGb": 123,
"scratchDiskCount": 123,
"numaNodes": 123
}
}
]
}
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Rentals
Get a rental
Look up one rental by its ID, whether it is still running or has ended. Returns null when no rental with that ID belongs to the caller.
GET
/
v2
/
on-demand
/
rental
Get a rental
curl --request GET \
--url https://api.hyperbolic.ai/v2/on-demand/rental \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hyperbolic.ai/v2/on-demand/rental"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hyperbolic.ai/v2/on-demand/rental', 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.hyperbolic.ai/v2/on-demand/rental",
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.hyperbolic.ai/v2/on-demand/rental"
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.hyperbolic.ai/v2/on-demand/rental")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperbolic.ai/v2/on-demand/rental")
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{
"state": "active",
"rental": {
"rentalId": "<string>",
"name": "<string>",
"label": "<string>",
"rentalType": "virtual-machine",
"region": "us-central-1",
"gpuType": "h100",
"gpuCount": 0,
"gpuFormFactor": "sxm5",
"connectionType": "infiniband",
"ethernetVariant": "normal",
"nodes": [
{
"cpuModel": "<string>",
"cpuCount": 123,
"vcpuCount": 123,
"gpuCount": 123,
"ramGb": 123,
"storageGb": 123
}
],
"sshEndpoints": [
{
"host": "<string>",
"port": 123,
"user": "<string>"
}
],
"networkInterfaces": [
{
"publicIp": "<string>",
"privateIp": "<string>"
}
],
"portMappings": [
{
"externalPort": 123,
"internalPort": 123
}
],
"supportsPortForwarding": true,
"exposedPorts": [
123
],
"supportsCustomPorts": true,
"attachedStorage": [
{
"storageVolumeId": "<string>",
"label": "<string>",
"sizeInGb": 0,
"virtualIp": "<string>",
"costPerHourCents": 123
}
],
"supportsAttachedStorage": true,
"monitoringEnabled": true,
"convertToOnDemandOnExpiry": true,
"terminationReason": "<string>",
"currentTerm": {
"effectiveAt": "2025-01-31T12:00:00.000Z",
"termType": "on-demand",
"costPerHour": 123,
"reservedUntil": null,
"reservationEndsAt": null,
"termPeriodDays": null,
"discountPercentage": null,
"originalCostPerHour": null
},
"createdAt": "2025-01-31T12:00:00.000Z",
"updatedAt": "2025-01-31T12:00:00.000Z",
"startedAt": "2025-01-31T12:00:00.000Z",
"terminatedAt": "2025-01-31T12:00:00.000Z",
"userId": "<string>",
"orgId": "<string>",
"createdBy": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"picture": "<string>"
},
"privateCluster": {
"gpuModel": "<string>",
"location": "<string>",
"sshUser": "<string>",
"sshPort": 123,
"nodes": [
{
"role": "login",
"hostname": "<string>",
"publicIp": "<string>",
"privateIp": "<string>"
}
],
"handover": {}
},
"managedCluster": {
"name": "<string>",
"label": "<string>"
},
"status": "Unknown",
"instances": [
{
"instanceRef": "<string>",
"phase": "<string>",
"ssh": "<string>",
"internalIp": "<string>",
"supportsReboot": true,
"actualResources": {
"vcpuCount": 123,
"ramGb": 123,
"gpuCount": 123,
"gpuMemoryGb": 123,
"gpuModel": "<string>",
"scratchDiskGb": 123,
"scratchDiskCount": 123,
"numaNodes": 123
}
}
]
}
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
The rental's rentalId.
Minimum string length:
1
