Usage & audit
Track token consumption, request volumes, and per-model breakdown — plus a filterable audit log of every Axon API call made by your tenant.
Usage summary
bash
GET /v1/axon/usage?days=30| Name | Type | Required | Description |
|---|---|---|---|
| days | integer | No | Lookback window (1–365). Defaults to 30. |
json
{
"data": {
"period_days": 30,
"since": "2025-05-02T00:00:00Z",
"totals": {
"requests": 4820,
"prompt_tokens": 9240180,
"completion_tokens": 1830440,
"total_tokens": 11070620
},
"by_model": {
"axon-sovereign-1": {
"requests": 1240,
"prompt_tokens": 8100200,
"completion_tokens": 1800000,
"total_tokens": 9900200
},
"axon-embed-1": {
"requests": 3580,
"prompt_tokens": 1139980,
"completion_tokens": 0,
"total_tokens": 1139980
}
},
"by_operation": {
"completion": 1240,
"embedding": 3380,
"rag_query": 200
}
}
}Audit log
bash
GET /v1/axon/audit| Name | Type | Required | Description |
|---|---|---|---|
| filter[operation] | string | No | completion | embedding | rag_query |
| filter[model] | string | No | axon-sovereign-1 | axon-sovereign-1-mini | axon-embed-1 |
| filter[knowledge_base_id] | string | No | Filter to a specific knowledge base. |
| filter[created_after] | string | No | ISO 8601 datetime lower bound. |
| filter[created_before] | string | No | ISO 8601 datetime upper bound. |
| page / per_page | integer | No | Pagination. Max per_page=100. |
json
{
"data": [
{
"id": "cmp_01hxyz",
"tenant_id": "ten_01hxyz",
"user_id": "usr_01hxyz",
"model": "axon-sovereign-1",
"operation": "completion",
"prompt_tokens": 286,
"completion_tokens": 201,
"knowledge_base_id": null,
"created_at": "2025-06-01T10:00:00Z"
}
],
"pagination": { "page": 1, "per_page": 20, "total": 4820, "has_more": true }
}Note:The audit log retains records for 12 months. For longer retention (required by some compliance frameworks), export regularly via the API or contact HLD to configure automated audit log forwarding to your SIEM.
Building a cost allocation report
typescript
// Monthly token cost report by operation type
const usage = await fetch('/v1/axon/usage?days=30').then(r => r.json())
const { by_model, by_operation } = usage.data
// Axon pricing (contact HLD for your contracted rates)
const RATES = {
'axon-sovereign-1': { input: 0.015, output: 0.075 }, // per 1K tokens
'axon-sovereign-1-mini': { input: 0.003, output: 0.015 },
'axon-embed-1': { input: 0.0001, output: 0 },
}
const cost = Object.entries(by_model).reduce((total, [model, stats]) => {
const rate = RATES[model] ?? { input: 0, output: 0 }
return total
+ (stats.prompt_tokens / 1000) * rate.input
+ (stats.completion_tokens / 1000) * rate.output
}, 0)
console.log(`Estimated Axon cost (30 days): $${cost.toFixed(2)} AUD`)