Skip to content
TriedDocs
Account

Get billing usage

Read call cost, minutes and calls per day and cost per product for a date range.

GEThttps://api.tried.com.au/billing/usage

Returns call usage for a time range: totals, a row per day in your time zone, and cost per product. The dashboard's Usage tab uses it. Any role can call it.

Request#

Field Type Required Description
from integer No Start, Unix ms. Default 30 days before to.
to integer No End, Unix ms. Default now.
tz string No IANA time zone for the daily rows. Default Australia/Sydney. An unknown zone falls back to UTC.

These are query parameters. Calls are included by creation time and grouped by start time.

Example request#

curl "https://api.tried.com.au/billing/usage?from=1758240000000&to=1760832000000&tz=Australia/Sydney" \
  -H "Authorization: Bearer $TRIED_API_KEY"
const res = await fetch("https://api.tried.com.au/billing/usage?from=1758240000000&to=1760832000000&tz=Australia/Sydney", {
  headers: { Authorization: `Bearer ${process.env.TRIED_API_KEY}` },
});
const usage = await res.json();
import os, requests

res = requests.get(
    "https://api.tried.com.au/billing/usage",
    params={
        "from": "1758240000000",
        "to": "1760832000000",
        "tz": "Australia/Sydney",
    },
    headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
)
usage = res.json()

Response#

200 OK

{
  "from": 1758240000000,
  "to": 1760832000000,
  "total_cost": 389.2,
  "total_minutes": 1621.6667,
  "total_calls": 1214,
  "daily": [
    {
      "date": "2026-09-19",
      "calls": 38,
      "minutes": 51.25,
      "cost": 12.3
    },
    {
      "date": "2026-09-20",
      "calls": 12,
      "minutes": 14.5,
      "cost": 3.48
    }
  ],
  "by_product": [
    {
      "product": "gpt-5.6-terra",
      "unit_price": 0.1,
      "cost": 162.1667
    },
    {
      "product": "voice_infra",
      "unit_price": 0.08,
      "cost": 129.7333
    },
    {
      "product": "voice_standard",
      "unit_price": 0.06,
      "cost": 97.3
    }
  ]
}

The daily list is cut short here.

Field Type Description
total_cost number Sum of call combined_cost in AUD.
total_minutes number Sum of call durations in minutes.
total_calls integer Number of calls in the range.
daily object[] One row per day (YYYY-MM-DD in tz), including days with no calls: calls, minutes, cost.
by_product object[] Cost per product line from each call's cost breakdown, highest first: product, unit_price (per minute), cost.

Errors#

Status When
400 Validation failed, for example from: Expected number, received nan.
401 Missing or invalid API key.
403 The key's IP allowlist or scopes reject the request. This route needs the admin scope.
429 Rate limit exceeded. See Rate limits.

See Errors for the body format.