/clusters/create
curl --request POST \
--url https://api.shadeform.ai/v1/clusters/create \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"name": "protestant-aquamarine-cluster",
"cloud": "denvr",
"region": "houston-usa-1",
"cluster_type": "H100_sxm5x8",
"num_instances": 2,
"ssh_key_id": "f0c6ac6d-7240-4968-8eb7-a11c4a0a5dc6",
"os": "ubuntu20.04"
}
'import requests
url = "https://api.shadeform.ai/v1/clusters/create"
payload = {
"name": "protestant-aquamarine-cluster",
"cloud": "denvr",
"region": "houston-usa-1",
"cluster_type": "H100_sxm5x8",
"num_instances": 2,
"ssh_key_id": "f0c6ac6d-7240-4968-8eb7-a11c4a0a5dc6",
"os": "ubuntu20.04"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'protestant-aquamarine-cluster',
cloud: 'denvr',
region: 'houston-usa-1',
cluster_type: 'H100_sxm5x8',
num_instances: 2,
ssh_key_id: 'f0c6ac6d-7240-4968-8eb7-a11c4a0a5dc6',
os: 'ubuntu20.04'
})
};
fetch('https://api.shadeform.ai/v1/clusters/create', 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.shadeform.ai/v1/clusters/create",
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([
'name' => 'protestant-aquamarine-cluster',
'cloud' => 'denvr',
'region' => 'houston-usa-1',
'cluster_type' => 'H100_sxm5x8',
'num_instances' => 2,
'ssh_key_id' => 'f0c6ac6d-7240-4968-8eb7-a11c4a0a5dc6',
'os' => 'ubuntu20.04'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.shadeform.ai/v1/clusters/create"
payload := strings.NewReader("{\n \"name\": \"protestant-aquamarine-cluster\",\n \"cloud\": \"denvr\",\n \"region\": \"houston-usa-1\",\n \"cluster_type\": \"H100_sxm5x8\",\n \"num_instances\": 2,\n \"ssh_key_id\": \"f0c6ac6d-7240-4968-8eb7-a11c4a0a5dc6\",\n \"os\": \"ubuntu20.04\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.shadeform.ai/v1/clusters/create")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"protestant-aquamarine-cluster\",\n \"cloud\": \"denvr\",\n \"region\": \"houston-usa-1\",\n \"cluster_type\": \"H100_sxm5x8\",\n \"num_instances\": 2,\n \"ssh_key_id\": \"f0c6ac6d-7240-4968-8eb7-a11c4a0a5dc6\",\n \"os\": \"ubuntu20.04\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shadeform.ai/v1/clusters/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"protestant-aquamarine-cluster\",\n \"cloud\": \"denvr\",\n \"region\": \"houston-usa-1\",\n \"cluster_type\": \"H100_sxm5x8\",\n \"num_instances\": 2,\n \"ssh_key_id\": \"f0c6ac6d-7240-4968-8eb7-a11c4a0a5dc6\",\n \"os\": \"ubuntu20.04\"\n}"
response = http.request(request)
puts response.read_body{
"id": "8eda86fe-0f36-41ed-9837-0ccf8f6e0fcb"
}Clusters
/clusters/create
Create a new GPU cluster.
POST
/
clusters
/
create
/clusters/create
curl --request POST \
--url https://api.shadeform.ai/v1/clusters/create \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"name": "protestant-aquamarine-cluster",
"cloud": "denvr",
"region": "houston-usa-1",
"cluster_type": "H100_sxm5x8",
"num_instances": 2,
"ssh_key_id": "f0c6ac6d-7240-4968-8eb7-a11c4a0a5dc6",
"os": "ubuntu20.04"
}
'import requests
url = "https://api.shadeform.ai/v1/clusters/create"
payload = {
"name": "protestant-aquamarine-cluster",
"cloud": "denvr",
"region": "houston-usa-1",
"cluster_type": "H100_sxm5x8",
"num_instances": 2,
"ssh_key_id": "f0c6ac6d-7240-4968-8eb7-a11c4a0a5dc6",
"os": "ubuntu20.04"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'protestant-aquamarine-cluster',
cloud: 'denvr',
region: 'houston-usa-1',
cluster_type: 'H100_sxm5x8',
num_instances: 2,
ssh_key_id: 'f0c6ac6d-7240-4968-8eb7-a11c4a0a5dc6',
os: 'ubuntu20.04'
})
};
fetch('https://api.shadeform.ai/v1/clusters/create', 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.shadeform.ai/v1/clusters/create",
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([
'name' => 'protestant-aquamarine-cluster',
'cloud' => 'denvr',
'region' => 'houston-usa-1',
'cluster_type' => 'H100_sxm5x8',
'num_instances' => 2,
'ssh_key_id' => 'f0c6ac6d-7240-4968-8eb7-a11c4a0a5dc6',
'os' => 'ubuntu20.04'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.shadeform.ai/v1/clusters/create"
payload := strings.NewReader("{\n \"name\": \"protestant-aquamarine-cluster\",\n \"cloud\": \"denvr\",\n \"region\": \"houston-usa-1\",\n \"cluster_type\": \"H100_sxm5x8\",\n \"num_instances\": 2,\n \"ssh_key_id\": \"f0c6ac6d-7240-4968-8eb7-a11c4a0a5dc6\",\n \"os\": \"ubuntu20.04\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.shadeform.ai/v1/clusters/create")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"protestant-aquamarine-cluster\",\n \"cloud\": \"denvr\",\n \"region\": \"houston-usa-1\",\n \"cluster_type\": \"H100_sxm5x8\",\n \"num_instances\": 2,\n \"ssh_key_id\": \"f0c6ac6d-7240-4968-8eb7-a11c4a0a5dc6\",\n \"os\": \"ubuntu20.04\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shadeform.ai/v1/clusters/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"protestant-aquamarine-cluster\",\n \"cloud\": \"denvr\",\n \"region\": \"houston-usa-1\",\n \"cluster_type\": \"H100_sxm5x8\",\n \"num_instances\": 2,\n \"ssh_key_id\": \"f0c6ac6d-7240-4968-8eb7-a11c4a0a5dc6\",\n \"os\": \"ubuntu20.04\"\n}"
response = http.request(request)
puts response.read_body{
"id": "8eda86fe-0f36-41ed-9837-0ccf8f6e0fcb"
}Authorizations
Body
application/json
The name of the cluster.
Example:
"protestant-aquamarine-cluster"
The cloud provider for the cluster.
Example:
"denvr"
The region where the cluster will be deployed.
Example:
"houston-usa-1"
The type of GPU cluster to create.
Example:
"H100_sxm5x8"
The number of instances in the cluster.
Example:
2
The SSH key ID to use for the cluster instances.
Example:
"f0c6ac6d-7240-4968-8eb7-a11c4a0a5dc6"
The operating system for the cluster.
Example:
"ubuntu20.04"
Response
200 - application/json
Returns a CreateClusterResponse object
Response of the /clusters/create API call
The unique identifier for the newly created cluster.
Example:
"8eda86fe-0f36-41ed-9837-0ccf8f6e0fcb"
⌘I