Usage export

List the organisation's usage charges, with who each charge was for. These are the same rows as the CSV export in the web app.

Scope

The key needs usage:read. Only admin and owner keys can hold it. A key without it gets 403 insufficient_scope. See Authentication & scopes.

Pull a month

curl -s "https://api.arbitr.ai/v1/usage?from=2026-10-01T00:00:00Z&to=2026-11-01T00:00:00Z&limit=200" \
  -H "X-API-Key: abr_live_…"
{
  "usage": [
    {
      "id": "6f1c2e0a-3b7d-4c55-9a52-1d2f0b8e7a41",
      "created_at": "2026-10-03T09:14:22Z",
      "project_id": null,
      "description": "Text translation",
      "usage_type": "api",
      "source_language_code": "en-us",
      "target_language_codes": ["ja-jp"],
      "unit": "character",
      "quantity": 120,
      "file_names": [],
      "intelligence_credits": 0.4,
      "trust_credits": 0,
      "character_credits": 0,
      "refunded_credits": 0,
      "api_key_id": "b3a9c1d2-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
      "requester": { "tenant_id": "acme", "external_id": "u-42" }
    }
  ],
  "page": { "number": 1, "has_more": false, "limit": 200 }
}

from and to are both required. The range is [from, to): from is included and to is not. Consecutive months never overlap, so you can pull each one with its own call. The range can span at most 366 days.

from and to are ISO-8601 datetimes. A value without an offset, such as 2026-10-01T00:00:00, is read as UTC. A value with an offset is converted to UTC. created_at is always returned in UTC.

Results are oldest first.

Paging

limit defaults to 50 and accepts 1 to 200. page starts at 1. There is no total count, so keep requesting pages until page.has_more is false.

A range can still receive charges while you page through it, for example a range ending now or a month that has just closed. Pull a closed range after a short settle delay, and de-duplicate rows by id in case a new charge shifts a row onto the next page.

Fields

Field Meaning
id Ledger transaction ID
created_at When the charge was made (UTC)
project_id Project the charge was for; null for text translation
description Free-text description of the charge
usage_type channel, dm, shortcut or api for text translation; document for projects; null otherwise
source_language_code Lowercase BCP-47, or null if the stored language can't be resolved
target_language_codes Lowercase BCP-47 tags. A language that can't be resolved is left out or is null
unit What quantity counts. See Units
quantity Amount in unit
file_names Every file you uploaded to the project, by its original name, including removed ones
intelligence_credits / trust_credits / character_credits Amount charged, in whichever wallet was charged
refunded_credits Credits later refunded for this charge, in the same wallet. 0 when nothing was refunded. See Refunds
api_key_id API key that made the request; null for web-app usage
requester Who the work was for. Present only when the caller named one

See Language codes.

Units

unit Used for
character Text translation, and SwiftBridge character-mode charges
word Other documents, priced by word
page Other documents, priced by page
minute Reserved for media. Nothing produces it yet

For page, quantity is the project's current page count, summed over the files you uploaded that are still active. It can differ from the count the charge was priced on if pages were later confirmed or changed. It is the project's total, so a project with more than one page-priced charge shows the same quantity on each of them. Don't sum quantity across rows of the same project.

Requester

requester is present only when the caller named one when creating the work. It has the same shape as on project reads, including two fields set when the requester's email matched a member of your organisation:

  • user_id — the id of the organisation member the work was recorded under.
  • matched_by — email (more values may be added).

When the email didn't match, both fields are absent. See Requester.

Refunds

The list holds usage charges only; a refund is never a row of its own. When a charge is later refunded, the refund is reported on the charge it reverses, in refunded_credits, in the same wallet as the charge.

Net spend for a row is the charged credits minus refunded_credits. For a fully refunded charge the two are equal and the net is 0.

Refunds made automatically, such as a text translation that failed after it was charged, are linked this way. Whole-project refunds made by arbitr staff are not linked yet: they are currently credited to your balance as a top-up, so the project's charges still show refunded_credits of 0. Linking them is planned.

Test mode

abr_test_… keys return two fixed example records and do not read real usage.