Skip to content

Usage and cost

Every response carries its own cost in usage.cost_usd. To see cost over time, use GET /usage. It needs a key with the usage scope.

curl "$KLARIS_API/usage?group_by=use_case&feature=klaris_agent&start=2026-11-01T00:00:00Z" \
  -H "Authorization: Bearer $KLARIS_KEY"
Parameter
start, end The period, as ISO 8601 times. Default: the last 30 days. At most a year. Times without a zone are taken as UTC.
group_by use_case (default), person, key, day, model, conversation or feature.
feature klaris_agent for only what this API spent. Leave out for the whole workspace, including Klaris's own screens.
{
  "object": "usage_report",
  "start": "2026-11-01T00:00:00",
  "end": "2026-11-05T10:00:00",
  "group_by": "use_case",
  "feature": "klaris_agent",
  "groups": [
    {
      "key": "renewal_summary",
      "label": "renewal_summary",
      "units": 412,
      "calls": 977,
      "input_tokens": 310220,
      "cache_write_tokens": 41800,
      "cache_read_tokens": 2950400,
      "output_tokens": 88410,
      "cache_hit_rate": 0.9043,
      "cost_usd": 4.812345,
      "unpriced_calls": 0
    }
  ],
  "totals": {
    "units": 412,
    "calls": 977,
    "input_tokens": 310220,
    "cache_write_tokens": 41800,
    "cache_read_tokens": 2950400,
    "output_tokens": 88410,
    "cost_usd": 4.812345,
    "unpriced_calls": 0,
    "cache_hit_rate": 0.9043
  }
}
  • units are responses: one question and its answer. calls are the model calls behind them; a response that looks things up makes several.
  • cache_hit_rate is how much of what the model read came from its cache, which costs much less. It is usually high, because Klaris keeps each conversation's start the same from turn to turn.
  • cost_usd is null when none of the calls had a price, which means unknown, not free. unpriced_calls counts the calls without one.

Tag your requests with use_case (see Asking the agent) to see what each part of your app costs.

The same report, with charts, is on Settings → Usage & Cost in Klaris.