/ai/token/breakdown


GET https://api.sitehost.nz/1.5/ai/token/breakdown.json

Returns the individual requests made with a token during one hour, newest first. Only the last 90 days are available. If truncated is true, not every request in that hour could be retrieved, either because the hour has more than 10,000 requests or because retrieval took too long, so the results are incomplete. client_id in each request is the router's identifier for the client, not the numeric client ID.

Query Parameters

ParameterTypeRequiredDescription
client_idintegerYesThe ID for the client.Example: 1
key_idstringYesThe ID of the token.Example: 3f6c2a9e-8b14-4d7a-9c5e-1a2b3c4d5e6f
bucketstringYesThe start of the hour to return, as an RFC3339 UTC timestamp on the hour. Format is 'YYYY-MM-DDTHH:00:00Z'. Cannot be in the future.Example: 2026-09-27T03:00:00Z
filters[model]stringShow only requests to a specific model.Example: Qwen/Qwen3.6-27B
filters[endpoint]stringShow only requests to a specific endpoint.Example: /v1/chat/completions
filters[status]integerShow only requests that returned a specific HTTP status code, from 100 to 599.Example: 200
filters[success]integerShow only successful (1) or failed (0) requests.Example: 1
filters[page_size]integerThe number of items to return per page. Defaults to 100, maximum 1000.
filters[page_number]integerThe page number to return.

Code Samples

JavaScript PHP Rails Python
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", "https://api.sitehost.nz/1.5/ai/token/breakdown.json?apikey=your_key_here&client_id=1&key_id=3f6c2a9e-8b14-4d7a-9c5e-1a2b3c4d5e6f&bucket=2026-09-27T03%3A00%3A00Z&filters[model]=Qwen%2FQwen3.6-27B&filters[endpoint]=%2Fv1%2Fchat%2Fcompletions&filters[status]=200&filters[success]=1", false);

xmlHttp.send();

var response = xmlHttp.responseText;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.sitehost.nz/1.5/ai/token/breakdown.json?apikey=your_key_here&client_id=1&key_id=3f6c2a9e-8b14-4d7a-9c5e-1a2b3c4d5e6f&bucket=2026-09-27T03%3A00%3A00Z&filters[model]=Qwen%2FQwen3.6-27B&filters[endpoint]=%2Fv1%2Fchat%2Fcompletions&filters[status]=200&filters[success]=1");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
require 'net/http'
require 'uri'

uri = URI.parse("https://api.sitehost.nz/1.5/ai/token/breakdown.json?apikey=your_key_here&client_id=1&key_id=3f6c2a9e-8b14-4d7a-9c5e-1a2b3c4d5e6f&bucket=2026-09-27T03%3A00%3A00Z&filters[model]=Qwen%2FQwen3.6-27B&filters[endpoint]=%2Fv1%2Fchat%2Fcompletions&filters[status]=200&filters[success]=1")
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Get.new(uri.request_uri)

response = http.request(request)
import requests

uri = 'https://api.sitehost.nz/1.5/ai/token/breakdown.json?apikey=your_key_here&client_id=1&key_id=3f6c2a9e-8b14-4d7a-9c5e-1a2b3c4d5e6f&bucket=2026-09-27T03%3A00%3A00Z&filters[model]=Qwen%2FQwen3.6-27B&filters[endpoint]=%2Fv1%2Fchat%2Fcompletions&filters[status]=200&filters[success]=1'

response = requests.get(uri)

Response

200:

application/json
{
    "return": {
        "total_items": 2,
        "current_items": 2,
        "current_page": 1,
        "total_pages": 1,
        "data": [
            {
                "request_id": "req_8f2c1b7a9d3e4f50",
                "ts": "2026-09-27T03:42:17Z",
                "client_id": "mysth-prod-1",
                "key_id": "3f6c2a9e-8b14-4d7a-9c5e-1a2b3c4d5e6f",
                "backend": "gpu-01",
                "model": "Qwen/Qwen3.6-27B",
                "endpoint": "/v1/chat/completions",
                "status": 200,
                "stream": true,
                "duration_ms": 2140,
                "prompt_tokens": 1850,
                "completion_tokens": 320,
                "cached_tokens": 1024,
                "ttft_ms": 210,
                "queue_ms": 15,
                "gen_ms": 1915,
                "usage_complete": true
            },
            {
                "request_id": "req_3a9e6d2c1f7b8e41",
                "ts": "2026-09-27T03:05:02Z",
                "client_id": "mysth-prod-1",
                "key_id": "3f6c2a9e-8b14-4d7a-9c5e-1a2b3c4d5e6f",
                "backend": "gpu-01",
                "model": "Qwen/Qwen3.6-27B",
                "endpoint": "/v1/chat/completions",
                "status": 429,
                "stream": false,
                "duration_ms": 4,
                "prompt_tokens": 0,
                "completion_tokens": 0,
                "cached_tokens": 0,
                "ttft_ms": null,
                "queue_ms": null,
                "gen_ms": null,
                "usage_complete": true
            }
        ],
        "truncated": false
    },
    "msg": "Successful",
    "status": true
}