Skip to content

Get music usage

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).

Path parameters

organization_id string required

The organization the usage is scoped to. The caller must belong to it.

Returns

A usage summary object.

organization_id string · The organization the usage is scoped to.

windows array · One entry per rolling window. Each window contains:

  • window string · day, week, or month.
  • window_start string · Start of the window (UTC).
  • cost_chf number · Spend within the window, in CHF.
  • limit_chf number · The organization's configured spend cap for the window, or null if none.
  • by_engine array · Per-engine breakdown, each with engine, track_count, and cost_chf.
cURL
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 }
      ]
    }
  ]
}