Retrieve the caller's music generation spend for an organization, summarized over rolling day, week, and month windows with a per-engine breakdown.
GEThttps://api.aitronos.com/v1/music/{organization_id}/usage
Use this to see how much headroom remains before the organization's spend cap rejects a generation. Each window reports the current spend and the configured cap (if any).
organization_id string required
The organization the usage is scoped to. The caller must belong to it.
A usage summary object.
organization_id string · The organization the usage is scoped to.
windows array · One entry per rolling window. Each window contains:
windowstring ·day,week, ormonth.window_startstring · Start of the window (UTC).cost_chfnumber · Spend within the window, in CHF.limit_chfnumber · The organization's configured spend cap for the window, ornullif none.by_enginearray · Per-engine breakdown, each withengine,track_count, andcost_chf.
cURL
- Bash
- Python
- Python
- JavaScript
curl "https://api.aitronos.com/v1/music/org_abc123/usage" \
-H "X-API-Key: $FREDDY_API_KEY"Response:
200 OK
{
"organization_id": "org_abc123",
"windows": [
{
"window": "day",
"window_start": "2026-06-28T00:00:00Z",
"cost_chf": 2.40,
"limit_chf": 10.00,
"by_engine": [
{ "engine": "studio", "track_count": 6, "cost_chf": 2.40 }
]
},
{
"window": "week",
"window_start": "2026-06-22T00:00:00Z",
"cost_chf": 11.20,
"limit_chf": 50.00,
"by_engine": [
{ "engine": "studio", "track_count": 28, "cost_chf": 11.20 }
]
},
{
"window": "month",
"window_start": "2026-06-01T00:00:00Z",
"cost_chf": 38.60,
"limit_chf": null,
"by_engine": [
{ "engine": "studio", "track_count": 96, "cost_chf": 38.60 }
]
}
]
}