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>",
"providerType": "runpod",
"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>"
}
]
}Disks
Create Disk
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>",
"providerType": "runpod",
"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
Body
application/json
Response
Successful Response
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 Was this page helpful?