Unquant

Opening your workspace…

Unquant

Usage API

Read your request log and usage reports with your API key, by time range, model, key and outcome.

GET /v1/usage/requests

curl -G https://api.unquant.io/v1/usage/requests \
  -H "Authorization: Bearer $UNQUANT_API_KEY" \
  -d from=2026-11-16T00:00:00Z -d to=2026-11-16T03:00:00Z -d limit=200

Any of your API keys reads the whole account's usage. The figures are the ones on the Usage page in your workspace.

Request log

Time
fromtime

Requests started at or after this time. Unix seconds or ISO 8601, such as 2026-11-16T02:00:00Z (UTC unless it carries an offset).

totime

Requests started before this time.

Filters
modelstring

A model ID, such as glm-5.3-flash.

keystring

One API key, by the key.id shown on each request.

outcomestring

ok, errors, cancelled, refused, busy (turned away at your stream limit), request_errors or running.

searchstring

One request ID: req_... or chatcmpl-req_....

Paging
limitinteger

Requests per page, 1 to 200. Default 50.

beforenumber

The next value from the previous page.

The reply is {"requests": [...], "next": ...}, newest first. Each request has its id, started and ended (Unix seconds), outcome, status, model, key, token counts (input_tokens, cached_tokens, output_tokens, reasoning_tokens), ttft_ms, duration, decode_tps and finish_reason. While next is set, more requests match: send it as before with the same filters.

import os, requests

url = "https://api.unquant.io/v1/usage/requests"
headers = {"Authorization": "Bearer " + os.environ["UNQUANT_API_KEY"]}
params = {"from": "2026-11-16T00:00:00Z", "to": "2026-11-16T03:00:00Z", "limit": 200}
rows = []
while True:
    page = requests.get(url, params=params, headers=headers).json()
    rows += page["requests"]
    if not page["next"]:
        break
    params["before"] = page["next"]

Usage report

GET /v1/usage

Totals, a time series, timings and breakdowns by model and key. Choose the period with range (1h, 6h, 24h, 7d, 30d, 90d, 1y or all) or with from and to; tz takes a time zone such as Europe/London for daily buckets. model and key filter it.

Live

GET /v1/usage/live

The requests running now against your stream limit, and the last few minutes of traffic.

Limits

120 calls a minute per account; beyond that the API returns 429. Requests are kept for 35 days. Prompts and replies are never stored, so the log holds counts and timings only.

Developer guide