Skip to main content
POST
/
api
/
v1
/
disks
/
Create Disk
curl --request POST \
  --url https://api.primeintellect.ai/api/v1/disks/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "disk": {
    "size": 123,
    "name": "<string>",
    "country": "<string>",
    "cloudId": "<string>",
    "dataCenterId": "<string>"
  },
  "provider": {},
  "team": {
    "teamId": "<string>"
  }
}
'
import requests

url = "https://api.primeintellect.ai/api/v1/disks/"

payload = {
"disk": {
"size": 123,
"name": "<string>",
"country": "<string>",
"cloudId": "<string>",
"dataCenterId": "<string>"
},
"provider": {},
"team": { "teamId": "<string>" }
}
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({
disk: {
size: 123,
name: '<string>',
country: '<string>',
cloudId: '<string>',
dataCenterId: '<string>'
},
provider: {},
team: {teamId: '<string>'}
})
};

fetch('https://api.primeintellect.ai/api/v1/disks/', 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.primeintellect.ai/api/v1/disks/",
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([
'disk' => [
'size' => 123,
'name' => '<string>',
'country' => '<string>',
'cloudId' => '<string>',
'dataCenterId' => '<string>'
],
'provider' => [

],
'team' => [
'teamId' => '<string>'
]
]),
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.primeintellect.ai/api/v1/disks/"

payload := strings.NewReader("{\n \"disk\": {\n \"size\": 123,\n \"name\": \"<string>\",\n \"country\": \"<string>\",\n \"cloudId\": \"<string>\",\n \"dataCenterId\": \"<string>\"\n },\n \"provider\": {},\n \"team\": {\n \"teamId\": \"<string>\"\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.primeintellect.ai/api/v1/disks/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"disk\": {\n \"size\": 123,\n \"name\": \"<string>\",\n \"country\": \"<string>\",\n \"cloudId\": \"<string>\",\n \"dataCenterId\": \"<string>\"\n },\n \"provider\": {},\n \"team\": {\n \"teamId\": \"<string>\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.primeintellect.ai/api/v1/disks/")

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 \"disk\": {\n \"size\": 123,\n \"name\": \"<string>\",\n \"country\": \"<string>\",\n \"cloudId\": \"<string>\",\n \"dataCenterId\": \"<string>\"\n },\n \"provider\": {},\n \"team\": {\n \"teamId\": \"<string>\"\n }\n}"

response = http.request(request)
puts response.read_body
{
  "name": "<string>",
  "userId": "<string>",
  "id": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "terminatedAt": "2023-11-07T05:31:56Z",
  "status": "PROVISIONING",
  "size": 0,
  "info": {},
  "priceHr": 123,
  "stoppedPriceHr": 123,
  "provisioningPriceHr": 0,
  "teamId": "<string>",
  "walletId": "<string>",
  "pods": [],
  "clusters": []
}
{
"errors": [
{
"param": "<string>",
"details": "<string>"
}
]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
disk
APIDiskCreateRequest · object
required
provider
ProviderConfig · object
required
team
TeamConfig · object | null

Response

Successful Response

name
string
required

Name of the disk.

Maximum string length: 255
providerType
enum<string>
required

Type of provider associated with the disk.

Available options:
runpod,
fluidstack,
lambdalabs,
hyperstack,
oblivus,
cudocompute,
scaleway,
tensordock,
datacrunch,
latitude,
crusoecloud,
massedcompute,
akash,
primeintellect,
primecompute,
dc_impala,
dc_kudu,
dc_roan,
nebius,
dc_eland,
dc_wildebeest,
vultr,
dc_gnu,
denvr
userId
string | null
required

ID of the user associated with this disk.

id
string

Unique identifier for the disk, generated as a UUID.

createdAt
string<date-time>

Timestamp when the disk was created.

updatedAt
string<date-time>

Timestamp when the disk was last updated.

terminatedAt
string<date-time> | null

Timestamp when the disk was terminated.

status
enum<string>
default:PROVISIONING

Current status of the disk.

Available options:
PROVISIONING,
PENDING,
ACTIVE,
STOPPED,
ERROR,
DELETING,
UNKNOWN,
TERMINATED
size
integer
default:0

Size of the disk in GB.

info
Info · object | null

JSON field for additional information about the disk.

priceHr
number | null

Hourly price for using the disk.

stoppedPriceHr
number | null

Hourly price when the disk is stopped.

provisioningPriceHr
number | null
default:0

Hourly price during provisioning.

teamId
string | null

ID of the team owning this disk.

walletId
string | null

ID of the wallet associated with this disk.

pods
string[]

Pods attached to the disk.

clusters
string[]

Clusters attached to the disk.