Skip to content

Spend

GET /analytics/spend

Returns what has been spent this month, in your billing currency: the total, each day, each model and each API key. The month is a calendar month in Japan time (JST), from 00:00 JST on the 1st to now.

Spend is what paid usage cost, chat and video, from the console, the Playground and API keys alike. Free models are not counted, and neither is Claude used through your organization’s own Anthropic key, which Anthropic bills.

Analytics → Spend shows the same figures:

  • Spent This Month, and Vs. Same Point Last Month: last month’s spend through the same day of the month.
  • Monthly Budget: how much of the monthly budget is used, when one is set.
  • Daily Spend, By Model and By API Key. Console (no API key) is spend from the console and the Playground.

The This Month card on Home sums it up, with View spend in Analytics for the rest.

RoleSees
Owner, Admin, Billing admin, Billing viewerThe whole organization, and the budget
MemberWhat their own API keys have spent, key by key. Not their console or Playground use, and no daily or per-model figures

An API key sees what its creator sees. See Members & Roles.

{
"scope": "org",
"currency": "jpy",
"period": {
"start": "2026-10-31T15:00:00.000Z",
"end": "2026-11-02T06:12:44.000Z",
"resets_at": "2026-11-30T15:00:00.000Z",
"previous_end": "2026-10-02T15:00:00.000Z"
},
"total": "16250.00",
"previous_to_date": "15100.00",
"budget": { "monthly": "300000.00", "remaining": "283750.00" },
"daily": [
{ "date": "2026-11-01", "spend": "7900.00" },
{ "date": "2026-11-02", "spend": "8350.00" }
],
"by_model": [
{ "model": "google/gemma-4-31b-it", "kind": "chat", "requests": 1840, "spend": "12000.00" },
{ "model": "minimaxai/minimax-h3", "kind": "video", "requests": 7, "spend": "4250.00" }
],
"by_key": [
{
"key_id": "4f6c2a7e-0d3b-4b8e-9a51-2c7e5d1f8f2a",
"name": "Production backend",
"masked_key": "sk-ab12...8f2a",
"created_by": { "name": "Kenji Sato", "email": "kenji@example.com" },
"spend": "14450.00"
},
{
"key_id": null,
"name": null,
"masked_key": null,
"created_by": null,
"spend": "1800.00"
}
]
}
FieldDescription
scopeorg when the figures cover the whole organization, own when they cover only the caller’s own API keys
currencyusd or jpy, your billing currency
periodstart is 00:00 JST on the 1st, end is now, resets_at is 00:00 JST on the next 1st, and previous_end is 00:00 JST after the same day last month, where previous_to_date stops
totalSpend this month
previous_to_dateLast month’s spend through the same day of the month. null for own
budgetmonthly is the budget and remaining what is left of it, negative when requests already running took spend past it. null when no budget is set, or when the caller’s role can’t view billing
dailyOne entry per JST day from the 1st to today, including days with no spend. null for own
by_modelSpend per model. kind is chat or video. requests counts requests, or videos for a video model. null for own
by_keySpend per API key. The entry whose key_id is null is spend from the console and the Playground. masked_key is null for a key revoked or expired more than 30 days ago

Amounts are decimal strings in the billing currency. Parse them with a decimal library rather than a float.

Only the console entry (key_id null) leaves out videos deleted since.

API key or JWT + X-Org-ID. See Authentication.

A restricted API key needs the Analytics API. See API Key Permissions.