AI
List model-serving deployments
Returns one row per model-serving deployment held by the tenant selected by the X-CostGraph-Tenant-ID header. Verdicts are recorded per replica, so each row carries the worst replica’s verdict and how many replicas share it rather than an average across replicas. A deployment with no accelerator measurements is not returned.
GET
/
api
/
v1
/
tenant
/
ai
/
deployments
List model-serving deployments
curl --request GET \
--url https://api.costgraph.ai/api/v1/tenant/ai/deployments \
--header 'Authorization: <api-key>' \
--header 'X-CostGraph-Tenant-ID: <x-costgraph-tenant-id>'import requests
url = "https://api.costgraph.ai/api/v1/tenant/ai/deployments"
headers = {
"X-CostGraph-Tenant-ID": "<x-costgraph-tenant-id>",
"Authorization": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-CostGraph-Tenant-ID': '<x-costgraph-tenant-id>', Authorization: '<api-key>'}
};
fetch('https://api.costgraph.ai/api/v1/tenant/ai/deployments', 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.costgraph.ai/api/v1/tenant/ai/deployments",
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: <api-key>",
"X-CostGraph-Tenant-ID: <x-costgraph-tenant-id>"
],
]);
$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.costgraph.ai/api/v1/tenant/ai/deployments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-CostGraph-Tenant-ID", "<x-costgraph-tenant-id>")
req.Header.Add("Authorization", "<api-key>")
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.costgraph.ai/api/v1/tenant/ai/deployments")
.header("X-CostGraph-Tenant-ID", "<x-costgraph-tenant-id>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.costgraph.ai/api/v1/tenant/ai/deployments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-CostGraph-Tenant-ID"] = '<x-costgraph-tenant-id>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "some message",
"status": "success",
"data": [
{
"action": "<string>",
"cards_current": 123,
"cards_recommended": 123,
"cluster_id": "<string>",
"cluster_name": "<string>",
"compute_cost_per_hour": 123,
"container_name": "<string>",
"cost_per_mtok": 123,
"data_age_hours": 123,
"deployment_name": "<string>",
"gateway": "<string>",
"gpu_memory_p95": 123,
"gpu_utilization_p95_worst": 123,
"kind": "<string>",
"model": "<string>",
"namespace": "<string>",
"reasons": [
"<string>"
],
"replica_count": 123,
"replicas_at_worst": 123,
"replicas_measured": 123,
"resource_id": "<string>",
"savings_per_month": 123,
"urgency": "<string>",
"utilization_band": "<string>",
"workload_report_id": "<string>",
"worst_replica_action": "<string>",
"worst_replica_band": "<string>",
"worst_replica_container_id": "<string>",
"worst_replica_urgency": "<string>"
}
]
}{
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}Authorizations
Enter "Bearer {token}"
Headers
Tenant ID
Query Parameters
Filter to one served model
Filter to one gateway
Filter to one namespace
Filter to one cluster
Filter on the worst replica's utilisation band
Filter on the worst replica's verdict
Filter on the worst replica's urgency
Maximum rows to return
Rows to skip
Was this page helpful?
⌘I
List model-serving deployments
curl --request GET \
--url https://api.costgraph.ai/api/v1/tenant/ai/deployments \
--header 'Authorization: <api-key>' \
--header 'X-CostGraph-Tenant-ID: <x-costgraph-tenant-id>'import requests
url = "https://api.costgraph.ai/api/v1/tenant/ai/deployments"
headers = {
"X-CostGraph-Tenant-ID": "<x-costgraph-tenant-id>",
"Authorization": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-CostGraph-Tenant-ID': '<x-costgraph-tenant-id>', Authorization: '<api-key>'}
};
fetch('https://api.costgraph.ai/api/v1/tenant/ai/deployments', 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.costgraph.ai/api/v1/tenant/ai/deployments",
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: <api-key>",
"X-CostGraph-Tenant-ID: <x-costgraph-tenant-id>"
],
]);
$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.costgraph.ai/api/v1/tenant/ai/deployments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-CostGraph-Tenant-ID", "<x-costgraph-tenant-id>")
req.Header.Add("Authorization", "<api-key>")
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.costgraph.ai/api/v1/tenant/ai/deployments")
.header("X-CostGraph-Tenant-ID", "<x-costgraph-tenant-id>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.costgraph.ai/api/v1/tenant/ai/deployments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-CostGraph-Tenant-ID"] = '<x-costgraph-tenant-id>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "some message",
"status": "success",
"data": [
{
"action": "<string>",
"cards_current": 123,
"cards_recommended": 123,
"cluster_id": "<string>",
"cluster_name": "<string>",
"compute_cost_per_hour": 123,
"container_name": "<string>",
"cost_per_mtok": 123,
"data_age_hours": 123,
"deployment_name": "<string>",
"gateway": "<string>",
"gpu_memory_p95": 123,
"gpu_utilization_p95_worst": 123,
"kind": "<string>",
"model": "<string>",
"namespace": "<string>",
"reasons": [
"<string>"
],
"replica_count": 123,
"replicas_at_worst": 123,
"replicas_measured": 123,
"resource_id": "<string>",
"savings_per_month": 123,
"urgency": "<string>",
"utilization_band": "<string>",
"workload_report_id": "<string>",
"worst_replica_action": "<string>",
"worst_replica_band": "<string>",
"worst_replica_container_id": "<string>",
"worst_replica_urgency": "<string>"
}
]
}{
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}