Create a storage volume
curl --request POST \
--url https://api.hyperbolic.ai/v2/alpha/on-demand/storage-volumes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"sizeInGb": 32128,
"rentalIds": [
4503599627370495
]
}
'import requests
url = "https://api.hyperbolic.ai/v2/alpha/on-demand/storage-volumes"
payload = {
"label": "<string>",
"sizeInGb": 32128,
"rentalIds": [4503599627370495]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({label: '<string>', sizeInGb: 32128, rentalIds: [4503599627370495]})
};
fetch('https://api.hyperbolic.ai/v2/alpha/on-demand/storage-volumes', 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/alpha/on-demand/storage-volumes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'label' => '<string>',
'sizeInGb' => 32128,
'rentalIds' => [
4503599627370495
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hyperbolic.ai/v2/alpha/on-demand/storage-volumes"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"sizeInGb\": 32128,\n \"rentalIds\": [\n 4503599627370495\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hyperbolic.ai/v2/alpha/on-demand/storage-volumes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"sizeInGb\": 32128,\n \"rentalIds\": [\n 4503599627370495\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperbolic.ai/v2/alpha/on-demand/storage-volumes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"<string>\",\n \"sizeInGb\": 32128,\n \"rentalIds\": [\n 4503599627370495\n ]\n}"
response = http.request(request)
puts response.read_body{
"storageVolumeId": "<string>",
"region": "us-central-1",
"status": "unknown",
"label": "<string>",
"sizeInGb": 32128,
"attachedRentalIds": [
"<string>"
],
"message": "<string>"
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Storage Volumes
Create a storage volume
deprecated
Deprecated. This path is the pre-/v2/ URL for /v2/on-demand/storage-volumes and is kept only so existing integrations keep working. It behaves identically, responds with a Sunset header, and stops being served on 2027-03-01. Move to /v2/on-demand/storage-volumes.
Create a storage volume
POST
/
v2
/
alpha
/
on-demand
/
storage-volumes
Create a storage volume
curl --request POST \
--url https://api.hyperbolic.ai/v2/alpha/on-demand/storage-volumes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"sizeInGb": 32128,
"rentalIds": [
4503599627370495
]
}
'import requests
url = "https://api.hyperbolic.ai/v2/alpha/on-demand/storage-volumes"
payload = {
"label": "<string>",
"sizeInGb": 32128,
"rentalIds": [4503599627370495]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({label: '<string>', sizeInGb: 32128, rentalIds: [4503599627370495]})
};
fetch('https://api.hyperbolic.ai/v2/alpha/on-demand/storage-volumes', 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/alpha/on-demand/storage-volumes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'label' => '<string>',
'sizeInGb' => 32128,
'rentalIds' => [
4503599627370495
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hyperbolic.ai/v2/alpha/on-demand/storage-volumes"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"sizeInGb\": 32128,\n \"rentalIds\": [\n 4503599627370495\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hyperbolic.ai/v2/alpha/on-demand/storage-volumes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"sizeInGb\": 32128,\n \"rentalIds\": [\n 4503599627370495\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperbolic.ai/v2/alpha/on-demand/storage-volumes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"<string>\",\n \"sizeInGb\": 32128,\n \"rentalIds\": [\n 4503599627370495\n ]\n}"
response = http.request(request)
puts response.read_body{
"storageVolumeId": "<string>",
"region": "us-central-1",
"status": "unknown",
"label": "<string>",
"sizeInGb": 32128,
"attachedRentalIds": [
"<string>"
],
"message": "<string>"
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"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.
Body
application/json
Available options:
us-central-1, us-central-2, eu-north-2, eu-west-2, eu-north-4, eu-north-5, us-east-1, us-east-2, ca-east-3, eu-north-6, eu-north-7, eu-north-8, ca-west-1, ca-east-1, us-central-3, us-southeast-1, me-central-1, ca-east-2, eu-west-1, us-southeast-2, jp-east-1, us-southeast-3, eu-west-5, us-east-3 Required string length:
4 - 255Pattern:
^[a-zA-Z0-9_-]+$Required range:
256 <= x <= 64000Must be a multiple of 256Required range:
0 < x <= 9007199254740991Response
Successful response
A newly created storage volume.
Available options:
us-central-1, us-central-2, eu-north-2, eu-west-2, eu-north-4, eu-north-5, us-east-1, us-east-2, ca-east-3, eu-north-6, eu-north-7, eu-north-8, ca-west-1, ca-east-1, us-central-3, us-southeast-1, me-central-1, ca-east-2, eu-west-1, us-southeast-2, jp-east-1, us-southeast-3, eu-west-5, us-east-3 Available options:
active, inactive, unknown Required string length:
4 - 255Pattern:
^[a-zA-Z0-9_-]+$Required range:
256 <= x <= 64000Must be a multiple of 256
