Skip to main content
The Usage API lets an organization admin read the organization’s usage with an API key, the same numbers the console shows on Usage and Logs: usage per member, per key, per tag, per model and per day, call-by-call details with a cost breakdown, and the CSV export.
The Usage API is enabled per organization. To turn it on for yours, contact support with your organization name.

Authentication

Send an API key in the Authorization header, exactly as for model calls:
Base URL: https://router-link.world3.ai/api/v1 Keys keep their own restrictions here too: a disabled or expired key, or a call from outside the key’s IP allowlist, is rejected as it would be for a model call.

Time ranges

  • start and end are ISO 8601 instants, for example 2026-11-01T00:00:00Z. Without a time zone they are read as UTC.
  • The range is [start, end). end defaults to now and start to 24 hours before end. The longest range is 31 days.
  • Day and week buckets (group_by=day|week) use Beijing time (UTC+8), like the console charts. Weeks start on Monday.

Get the calling key

endpoint
Settings, budget and recent usage of the key you call with.
  • budget_* are null when the key has no budget. resets_at is the end of the current budget period.
  • today and month start at the UTC day and UTC calendar month; last_30d is the last 30 days up to now.

Organization usage

endpoint
Usage of the whole organization, grouped and filtered. Organization admin keys only.
Filters can be combined. With group_by=member only member and model filters are accepted.
Rows per group_by: Every row also has requests, total_tokens and cost_usd; member, key and tag rows add the cache token and cache cost fields.
totals covers every key of the organization, including deleted keys. Rows of key and tag list only keys that still exist, and a key with several tags is counted under each tag, so the rows do not always add up to totals.

Call details

endpoint
The organization’s calls, newest first, with cursor paging. Organization admin keys only.
Paging: pass the same filters and the start / end returned by the first page on every following page, together with cursor. If you leave start / end out, the default window moves with the clock while you page, and a long walk ends with 400 invalid_cursor or misses calls. next_cursor: null means the last page.
  • created_at on call rows is UTC without a time zone suffix (for example 2026-11-24T01:02:03). Do not parse it as local time.
  • Rows include calls of deleted keys and of members who have left; api_key_name is null for a deleted key.

Cost breakdown

cost_breakdown splits the call’s cost by billing item. It is null for calls billed before breakdowns were recorded and for a few restricted channels.
The item cost_credits add up exactly to the row’s cost_credits. Amounts are decimal strings to keep full precision.

Export as CSV

endpoint
The same CSV as Export on the console’s organization logs page (one line per billing item). Organization admin keys only.

Amounts

  • cost_usd is converted from credits at 1,000 credits = 1 USD, as in the console.
  • On a call row, cost_usd is the price estimate shown in the console. If it ever differs from the credits, the credits are authoritative.

Errors

Errors from the key check use the same format as model calls. Other errors return {"detail": {"code": "…", "message": "…"}}.

Limits

  • Each endpoint allows 20 calls per minute per user and organization (shared with the console’s usage pages).
  • /org/usage results are cached for 45 seconds when you pass an explicit end; call details are never cached.
  • Large organizations: prefer shorter ranges and the CSV export for bulk downloads. Filtering by status reads more data and can be slower.