Terminate cluster
Terminates every machine together; billing for the whole cluster ends. Files on the machines and in /shared are deleted, except what a volume keeps in /shared/volume. One machine of a cluster cannot be terminated through DELETE /instances/{id} (409 CLUSTER_MEMBER).
DELETE
/
clusters
/
{id}
Terminate cluster
curl --request DELETE \
--url https://www.runcrate.ai/api/v1/clusters/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.runcrate.ai/api/v1/clusters/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.runcrate.ai/api/v1/clusters/{id}', 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://www.runcrate.ai/api/v1/clusters/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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://www.runcrate.ai/api/v1/clusters/{id}"
req, _ := http.NewRequest("DELETE", 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.delete("https://www.runcrate.ai/api/v1/clusters/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.runcrate.ai/api/v1/clusters/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "provisioning",
"stack": "none",
"stack_status": "pending",
"stack_detail": "<string>",
"node_count": 123,
"gpu_type": "<string>",
"gpus_per_node": 123,
"deployment_type": "vm",
"host_tier": "datacenter",
"location": "<string>",
"interconnect": {
"kind": "infiniband",
"label": "<string>",
"rate_gbps": 123,
"note": "<string>"
},
"hourly_rate_per_node": 123,
"hourly_rate": 123,
"created_at": "2023-11-07T05:31:56Z",
"up_at": "2023-11-07T05:31:56Z",
"ready_at": "2023-11-07T05:31:56Z",
"terminated_at": "2023-11-07T05:31:56Z",
"nodes": [
{
"rank": 123,
"role": "head",
"instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "train-1",
"status": "<string>",
"stage": "<string>",
"overlay_address": "<string>",
"gpus": 123,
"ip": "<string>",
"ssh_command": "<string>"
}
],
"connection": {
"head_ssh": "<string>",
"hostfile": "<string>",
"env": {
"MASTER_ADDR": "<string>",
"MASTER_PORT": "<string>",
"NCCL_SOCKET_IFNAME": "<string>"
},
"snippets": {
"torchrun": "<string>",
"mpirun": "<string>",
"deepspeed": "<string>",
"sbatch": "<string>",
"kubectl_tunnel": "<string>",
"ray_tunnel": "<string>"
}
},
"shared": {
"path": "/shared",
"available": true,
"detail": "<string>",
"volume": {
"id": "<string>",
"name": "<string>",
"path": "/shared/volume"
}
},
"events": [
{
"id": 123,
"at": "2023-11-07T05:31:56Z",
"kind": "<string>",
"rank": 123,
"message": "<string>"
}
],
"last_test": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "nccl_all_reduce",
"status": "running",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"result": {
"sizes": [
{
"bytes": 123,
"algbw_gb_s": 123,
"busbw_gb_s": 123,
"time_us": 123
}
],
"peak_busbw_gb_s": 123,
"nodes": 123,
"gpus": 123,
"error": "<string>",
"note": "<string>"
}
},
"billing": {
"billed_since": "2023-11-07T05:31:56Z",
"nodes_billed": 123
},
"resize": true,
"country_code": "<string>",
"failure_reason": "<string>",
"failure_detail": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Authorizations
Use a Runcrate API key with the rc_live_* prefix as the bearer token. Create one at https://www.runcrate.ai/dashboard/api-keys.
Path Parameters
Cluster ID
Response
The cluster, terminating, or terminated once done. meta.warning says why a release is still being retried.
Show child attributes
Show child attributes
⌘I
Terminate cluster
curl --request DELETE \
--url https://www.runcrate.ai/api/v1/clusters/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.runcrate.ai/api/v1/clusters/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.runcrate.ai/api/v1/clusters/{id}', 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://www.runcrate.ai/api/v1/clusters/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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://www.runcrate.ai/api/v1/clusters/{id}"
req, _ := http.NewRequest("DELETE", 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.delete("https://www.runcrate.ai/api/v1/clusters/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.runcrate.ai/api/v1/clusters/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "provisioning",
"stack": "none",
"stack_status": "pending",
"stack_detail": "<string>",
"node_count": 123,
"gpu_type": "<string>",
"gpus_per_node": 123,
"deployment_type": "vm",
"host_tier": "datacenter",
"location": "<string>",
"interconnect": {
"kind": "infiniband",
"label": "<string>",
"rate_gbps": 123,
"note": "<string>"
},
"hourly_rate_per_node": 123,
"hourly_rate": 123,
"created_at": "2023-11-07T05:31:56Z",
"up_at": "2023-11-07T05:31:56Z",
"ready_at": "2023-11-07T05:31:56Z",
"terminated_at": "2023-11-07T05:31:56Z",
"nodes": [
{
"rank": 123,
"role": "head",
"instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "train-1",
"status": "<string>",
"stage": "<string>",
"overlay_address": "<string>",
"gpus": 123,
"ip": "<string>",
"ssh_command": "<string>"
}
],
"connection": {
"head_ssh": "<string>",
"hostfile": "<string>",
"env": {
"MASTER_ADDR": "<string>",
"MASTER_PORT": "<string>",
"NCCL_SOCKET_IFNAME": "<string>"
},
"snippets": {
"torchrun": "<string>",
"mpirun": "<string>",
"deepspeed": "<string>",
"sbatch": "<string>",
"kubectl_tunnel": "<string>",
"ray_tunnel": "<string>"
}
},
"shared": {
"path": "/shared",
"available": true,
"detail": "<string>",
"volume": {
"id": "<string>",
"name": "<string>",
"path": "/shared/volume"
}
},
"events": [
{
"id": 123,
"at": "2023-11-07T05:31:56Z",
"kind": "<string>",
"rank": 123,
"message": "<string>"
}
],
"last_test": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "nccl_all_reduce",
"status": "running",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"result": {
"sizes": [
{
"bytes": 123,
"algbw_gb_s": 123,
"busbw_gb_s": 123,
"time_us": 123
}
],
"peak_busbw_gb_s": 123,
"nodes": 123,
"gpus": 123,
"error": "<string>",
"note": "<string>"
}
},
"billing": {
"billed_since": "2023-11-07T05:31:56Z",
"nodes_billed": 123
},
"resize": true,
"country_code": "<string>",
"failure_reason": "<string>",
"failure_detail": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}