Skip to main content

Usage and spend cap

Read token and GBP usage for yourself or your organization, list recent requests, check budget burn, and set your own spend cap.

On this page
GET /api/v1/usage/me
Your totals for a window, by day.

Scope: member scope usage:read

GET /api/v1/usage/me/logs
Your recent requests, metadata only.

Scope: member scope usage:read

GET /api/v1/usage/me/budget
Token burn for the current day or month, with error rates.

Scope: member scope usage:read

GET /api/v1/usage/me/budget/cap
Your spend cap.

Scope: member scope usage:read

PUT /api/v1/usage/me/budget/cap
Set your spend cap.

Scope: member scope settings:write

DELETE /api/v1/usage/me/budget/cap
Remove your spend cap.

Scope: member scope settings:write

GET /api/v1/usage/org/{org_id}
Organization totals. Members only.
GET /api/v1/usage/org/{org_id}/logs
Organization requests. Members only.
GET /api/v1/usage/org/{org_id}/budget
Organization budget burn. Members only.

Usage totals

This month, by day
curl "https://api.breachline.io/api/v1/usage/me?since=2026-11-01&until=2026-12-01" \
  -H "Authorization: Bearer $BREACHLINE_API_KEY"

since is inclusive and until exclusive, both ISO-8601; a date without a time zone is read as UTC. group_by_day (default true) adds a per-day breakdown.

Response (abridged)
{
  "scope": "user",
  "since": "2026-11-01T00:00:00+00:00",
  "until": "2026-12-01T00:00:00+00:00",
  "totals": {"input_tokens": 120400, "output_tokens": 38210, "total_tokens": 158610, "price_gbp": 1.97, "requests": 214},
  "daily": [{"date": "2026-11-10", "input_tokens": 9100, "output_tokens": 2800, "total_tokens": 11900, "price_gbp": 0.15, "requests": 17}]
}

Activity log

GET /usage/me/logs pages with limit (1 to 100, default 20) and offset, and returns has_more. Each entry has the time, endpoint, public model label, token counts (including cache reads and writes), HTTP status and latency. Prompt and response content is never stored in the log.

Spend cap

A spend cap is your own ceiling on retail GBP spend per day or month. When spending in the window reaches it, LLM requests get 402 until the window resets or you raise the cap.

Set, read and clear
curl -X PUT "https://api.breachline.io/api/v1/usage/me/budget/cap?max_gbp=50&window=month" -H "Authorization: Bearer $BREACHLINE_API_KEY"
curl https://api.breachline.io/api/v1/usage/me/budget/cap -H "Authorization: Bearer $BREACHLINE_API_KEY"
curl -X DELETE https://api.breachline.io/api/v1/usage/me/budget/cap -H "Authorization: Bearer $BREACHLINE_API_KEY"

max_gbp must be greater than zero. With no cap set, GET returns {"cap_gbp": null, "window": null}.

Search documentation

Type to search guides, the API reference, the CLI and the console guide.

    Enter open↑ ↓ moveEsc close