Get Cluster Node Metrics
curl --request GET \
--url https://api.primeintellect.ai/api/v1/model-factory/clusters/{cluster_id}/metrics/nodes \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.primeintellect.ai/api/v1/model-factory/clusters/{cluster_id}/metrics/nodes"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.primeintellect.ai/api/v1/model-factory/clusters/{cluster_id}/metrics/nodes', 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/model-factory/clusters/{cluster_id}/metrics/nodes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://api.primeintellect.ai/api/v1/model-factory/clusters/{cluster_id}/metrics/nodes"
req, _ := http.NewRequest("GET", 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.get("https://api.primeintellect.ai/api/v1/model-factory/clusters/{cluster_id}/metrics/nodes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.primeintellect.ai/api/v1/model-factory/clusters/{cluster_id}/metrics/nodes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"cluster_id": "<string>",
"cluster_display_name": "<string>",
"window": "1h",
"step_seconds": 123,
"as_of": "2023-11-07T05:31:56Z",
"available": true,
"nodes": [
{
"name": "<string>",
"state": "ready",
"current": {
"gpu_util_percent": 123,
"gpu_memory_used_bytes": 123,
"gpu_memory_total_bytes": 123,
"gpu_temperature_celsius": 123,
"gpu_power_watts": 123,
"cpu_util_percent": 123,
"memory_used_bytes": 123,
"memory_total_bytes": 123,
"network_rx_bytes_per_second": 123,
"network_tx_bytes_per_second": 123,
"ib_rx_bytes_per_second": 123,
"ib_tx_bytes_per_second": 123,
"ib_errors_per_second": 123,
"load_1m": 123,
"tcp_retransmits_per_second": 123,
"load_5m": 123,
"load_15m": 123,
"cpu_iowait_percent": 123,
"disk_read_bytes_per_second": 123,
"disk_write_bytes_per_second": 123,
"disk_write_latency_seconds": 123,
"shared_fs_available_bytes": 123,
"nfs_requests_per_second": 123,
"nfs_rpc_retransmissions_per_second": 123,
"tcp_timeouts_per_second": 123,
"tcp_listen_drops_per_second": 123,
"udp_errors_per_second": 123,
"gpu_sm_clock_mhz": 123,
"gpu_memory_clock_mhz": 123,
"gpu_memory_copy_util_percent": 123,
"gpu_pcie_rx_bytes_per_second": 123,
"gpu_pcie_tx_bytes_per_second": 123,
"gpu_nvlink_bytes_per_second": 123
},
"series": {},
"gpu_type": "<string>",
"gpu_count": 123,
"gpus": [],
"ib_ports": []
}
],
"schema_version": 1,
"unavailable_reason": "<string>",
"unavailable_code": "no_cluster_label"
}{
"errors": [
{
"param": "<string>",
"details": "<string>"
}
]
}factory
Get Cluster Node Metrics
Per-node GPU and host metrics for one dedicated cluster. The
caller must be a member of the team the cluster is dedicated to; any
other cluster id (or a node outside the cluster) is a 404. A 200
with available=false means there is no data for the cluster; a
503 means the metrics store cannot be reached.
GET
/
api
/
v1
/
model-factory
/
clusters
/
{cluster_id}
/
metrics
/
nodes
Get Cluster Node Metrics
curl --request GET \
--url https://api.primeintellect.ai/api/v1/model-factory/clusters/{cluster_id}/metrics/nodes \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.primeintellect.ai/api/v1/model-factory/clusters/{cluster_id}/metrics/nodes"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.primeintellect.ai/api/v1/model-factory/clusters/{cluster_id}/metrics/nodes', 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/model-factory/clusters/{cluster_id}/metrics/nodes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://api.primeintellect.ai/api/v1/model-factory/clusters/{cluster_id}/metrics/nodes"
req, _ := http.NewRequest("GET", 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.get("https://api.primeintellect.ai/api/v1/model-factory/clusters/{cluster_id}/metrics/nodes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.primeintellect.ai/api/v1/model-factory/clusters/{cluster_id}/metrics/nodes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"cluster_id": "<string>",
"cluster_display_name": "<string>",
"window": "1h",
"step_seconds": 123,
"as_of": "2023-11-07T05:31:56Z",
"available": true,
"nodes": [
{
"name": "<string>",
"state": "ready",
"current": {
"gpu_util_percent": 123,
"gpu_memory_used_bytes": 123,
"gpu_memory_total_bytes": 123,
"gpu_temperature_celsius": 123,
"gpu_power_watts": 123,
"cpu_util_percent": 123,
"memory_used_bytes": 123,
"memory_total_bytes": 123,
"network_rx_bytes_per_second": 123,
"network_tx_bytes_per_second": 123,
"ib_rx_bytes_per_second": 123,
"ib_tx_bytes_per_second": 123,
"ib_errors_per_second": 123,
"load_1m": 123,
"tcp_retransmits_per_second": 123,
"load_5m": 123,
"load_15m": 123,
"cpu_iowait_percent": 123,
"disk_read_bytes_per_second": 123,
"disk_write_bytes_per_second": 123,
"disk_write_latency_seconds": 123,
"shared_fs_available_bytes": 123,
"nfs_requests_per_second": 123,
"nfs_rpc_retransmissions_per_second": 123,
"tcp_timeouts_per_second": 123,
"tcp_listen_drops_per_second": 123,
"udp_errors_per_second": 123,
"gpu_sm_clock_mhz": 123,
"gpu_memory_clock_mhz": 123,
"gpu_memory_copy_util_percent": 123,
"gpu_pcie_rx_bytes_per_second": 123,
"gpu_pcie_tx_bytes_per_second": 123,
"gpu_nvlink_bytes_per_second": 123
},
"series": {},
"gpu_type": "<string>",
"gpu_count": 123,
"gpus": [],
"ib_ports": []
}
],
"schema_version": 1,
"unavailable_reason": "<string>",
"unavailable_code": "no_cluster_label"
}{
"errors": [
{
"param": "<string>",
"details": "<string>"
}
]
}Authorizations
Query Parameters
Response
Successful Response
available=false means the cluster exists and the caller may see
it but there is nothing to show; unavailable_reason is then a short
user-facing sentence. A metrics store that cannot be reached is a 503,
not a 200 with available=false.
Was this page helpful?