Get Usage Analytics
curl --request POST \
--url https://api.app.simplismart.ai/usage/stats/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"plan_type": "private",
"start_time": "2026-10-22T00:00:00Z",
"end_time": "2026-10-29T00:00:00Z",
"window_size": "DAY",
"deployment_ids": [
"3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b"
],
"group_by": [
"source",
"feature_id"
]
}
'import requests
url = "https://api.app.simplismart.ai/usage/stats/"
payload = {
"plan_type": "private",
"start_time": "2026-10-22T00:00:00Z",
"end_time": "2026-10-29T00:00:00Z",
"window_size": "DAY",
"deployment_ids": ["3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b"],
"group_by": ["source", "feature_id"]
}
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({
plan_type: 'private',
start_time: '2026-10-22T00:00:00Z',
end_time: '2026-10-29T00:00:00Z',
window_size: 'DAY',
deployment_ids: ['3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b'],
group_by: ['source', 'feature_id']
})
};
fetch('https://api.app.simplismart.ai/usage/stats/', 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.app.simplismart.ai/usage/stats/",
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([
'plan_type' => 'private',
'start_time' => '2026-10-22T00:00:00Z',
'end_time' => '2026-10-29T00:00:00Z',
'window_size' => 'DAY',
'deployment_ids' => [
'3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b'
],
'group_by' => [
'source',
'feature_id'
]
]),
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.app.simplismart.ai/usage/stats/"
payload := strings.NewReader("{\n \"plan_type\": \"private\",\n \"start_time\": \"2026-10-22T00:00:00Z\",\n \"end_time\": \"2026-10-29T00:00:00Z\",\n \"window_size\": \"DAY\",\n \"deployment_ids\": [\n \"3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b\"\n ],\n \"group_by\": [\n \"source\",\n \"feature_id\"\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.app.simplismart.ai/usage/stats/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"plan_type\": \"private\",\n \"start_time\": \"2026-10-22T00:00:00Z\",\n \"end_time\": \"2026-10-29T00:00:00Z\",\n \"window_size\": \"DAY\",\n \"deployment_ids\": [\n \"3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b\"\n ],\n \"group_by\": [\n \"source\",\n \"feature_id\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.app.simplismart.ai/usage/stats/")
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 \"plan_type\": \"private\",\n \"start_time\": \"2026-10-22T00:00:00Z\",\n \"end_time\": \"2026-10-29T00:00:00Z\",\n \"window_size\": \"DAY\",\n \"deployment_ids\": [\n \"3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b\"\n ],\n \"group_by\": [\n \"source\",\n \"feature_id\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"source": "llama-3-8b-prod_3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b",
"feature_id": "feat_01JW63P4JH5909JHMTWAMAH67D",
"event_name": "2-X-nvidia-h100-deployment",
"total_usage": "2660",
"total_cost": "310.33",
"currency": "usd",
"unit_price": {
"amount": "0.066666666666667",
"currency": "usd"
},
"event_count": 1330,
"points": [
{
"timestamp": "2026-10-22T00:00:00Z",
"usage": "2660",
"cost": "310.33",
"computed_commitment_utilized_amount": "0",
"computed_overage_amount": "0",
"computed_true_up_amount": "0",
"event_count": 1330
}
]
}
],
"subtotal": "310.33",
"total_discount": "0",
"total_cost": "310.33",
"currency": "usd"
}{
"deployment_ids": [
"Cannot be combined with an explicit group_by that omits 'source' - a pooled/accelerator-grouped query never resolves per-deployment sources, so this filter would be silently ignored. Add 'source' to group_by (or omit group_by entirely) to get the per-deployment shape instead."
]
}{
"error": "Authentication failed"
}{
"error": "You don’t have permission to view billing for this organisation."
}{
"error": "Organisation not found"
}{
"error": "Internal server error."
}Usage
Get Usage Analytics
Returns usage and cost for one plan type over a time range, in buckets of window_size. Requires billing access.
POST
/
usage
/
stats
/
Get Usage Analytics
curl --request POST \
--url https://api.app.simplismart.ai/usage/stats/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"plan_type": "private",
"start_time": "2026-10-22T00:00:00Z",
"end_time": "2026-10-29T00:00:00Z",
"window_size": "DAY",
"deployment_ids": [
"3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b"
],
"group_by": [
"source",
"feature_id"
]
}
'import requests
url = "https://api.app.simplismart.ai/usage/stats/"
payload = {
"plan_type": "private",
"start_time": "2026-10-22T00:00:00Z",
"end_time": "2026-10-29T00:00:00Z",
"window_size": "DAY",
"deployment_ids": ["3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b"],
"group_by": ["source", "feature_id"]
}
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({
plan_type: 'private',
start_time: '2026-10-22T00:00:00Z',
end_time: '2026-10-29T00:00:00Z',
window_size: 'DAY',
deployment_ids: ['3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b'],
group_by: ['source', 'feature_id']
})
};
fetch('https://api.app.simplismart.ai/usage/stats/', 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.app.simplismart.ai/usage/stats/",
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([
'plan_type' => 'private',
'start_time' => '2026-10-22T00:00:00Z',
'end_time' => '2026-10-29T00:00:00Z',
'window_size' => 'DAY',
'deployment_ids' => [
'3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b'
],
'group_by' => [
'source',
'feature_id'
]
]),
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.app.simplismart.ai/usage/stats/"
payload := strings.NewReader("{\n \"plan_type\": \"private\",\n \"start_time\": \"2026-10-22T00:00:00Z\",\n \"end_time\": \"2026-10-29T00:00:00Z\",\n \"window_size\": \"DAY\",\n \"deployment_ids\": [\n \"3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b\"\n ],\n \"group_by\": [\n \"source\",\n \"feature_id\"\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.app.simplismart.ai/usage/stats/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"plan_type\": \"private\",\n \"start_time\": \"2026-10-22T00:00:00Z\",\n \"end_time\": \"2026-10-29T00:00:00Z\",\n \"window_size\": \"DAY\",\n \"deployment_ids\": [\n \"3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b\"\n ],\n \"group_by\": [\n \"source\",\n \"feature_id\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.app.simplismart.ai/usage/stats/")
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 \"plan_type\": \"private\",\n \"start_time\": \"2026-10-22T00:00:00Z\",\n \"end_time\": \"2026-10-29T00:00:00Z\",\n \"window_size\": \"DAY\",\n \"deployment_ids\": [\n \"3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b\"\n ],\n \"group_by\": [\n \"source\",\n \"feature_id\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"source": "llama-3-8b-prod_3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b",
"feature_id": "feat_01JW63P4JH5909JHMTWAMAH67D",
"event_name": "2-X-nvidia-h100-deployment",
"total_usage": "2660",
"total_cost": "310.33",
"currency": "usd",
"unit_price": {
"amount": "0.066666666666667",
"currency": "usd"
},
"event_count": 1330,
"points": [
{
"timestamp": "2026-10-22T00:00:00Z",
"usage": "2660",
"cost": "310.33",
"computed_commitment_utilized_amount": "0",
"computed_overage_amount": "0",
"computed_true_up_amount": "0",
"event_count": 1330
}
]
}
],
"subtotal": "310.33",
"total_discount": "0",
"total_cost": "310.33",
"currency": "usd"
}{
"deployment_ids": [
"Cannot be combined with an explicit group_by that omits 'source' - a pooled/accelerator-grouped query never resolves per-deployment sources, so this filter would be silently ignored. Add 'source' to group_by (or omit group_by entirely) to get the per-deployment shape instead."
]
}{
"error": "Authentication failed"
}{
"error": "You don’t have permission to view billing for this organisation."
}{
"error": "Organisation not found"
}{
"error": "Internal server error."
}Authorizations
Body
application/json
Which usage to return. Each plan type has its own filters (see below). private includes reserved GPUs: for an org with a reservation it returns the reserved plan, as the dashboard's Private tab does. reserved is deprecated; use private.
Available options:
shared, private, byoc, reserved, training, compilation Only resources in these statuses. Ignored for training.
Available options:
PROGRESSING, PENDING, DEPLOYING, DEPLOYED, DEPLOYED_WARMPOOL, FAILED_DELETING, FAILED_WARMPOOL, FAILED_DELETING_WARMPOOL, FAILED, DELETING, DELETED, STOPPED, EDIT_IN_PROGRESS, EDIT_WARMPOOL_IN_PROGRESS, EDIT_ROLLBACK_IN_PROGRESS, EDIT_ROLLBACK_FAILED, EDIT_SUCCESS Response
Successful response
Was this page helpful?