Usage
PreviewToken usage, the activity log and the self-service spend cap. Reference for API version next.
On this page
Get your usage
/api/v1/usage/me Token, request and GBP totals for the caller over a window, optionally by day. Requires the usage:read member scope.
Authentication
- API key in X-API-Key
- API key or session token in Authorization: Bearer
Query parameters
sincestringISO-8601 start of the window (inclusive). A date without a time zone is read as UTC.
- Examples
2026-11-01
untilstringISO-8601 end of the window (exclusive).
- Examples
2026-11-11
group_by_dayboolean- Default
true
Responses
200The usage summary.Body (application/json)
scopestring- One of
userorg
scope_idstring or nullsincestring or nulluntilstring or nulltotalsobject8 fields in
totalsinput_tokensintegeroutput_tokensintegertotal_tokensintegerprice_gbpnumberCustomer charge for the window, in GBP.
requestsintegerp50_latency_msnumber or nullp95_latency_msnumber or nullcache_hit_rate_pctnumber or null
dailyarray of objects6 fields in
dailydatestringYYYY-MM-DD (UTC).
input_tokensintegeroutput_tokensintegertotal_tokensintegerprice_gbpnumberrequestsinteger
ratesobject
429A per-user limit was exceeded (the Platform API, embeddings or rerank). This response does not use the error envelope. Wait forRetry-Afterseconds.Headers
X-Request-IDstringThe request's correlation id (yours, or one BreachLine generated). Quote it to support.
Retry-AfterintegerSeconds to wait before retrying.
Body (application/json)
detailstring Requiredretry_afterinteger Required- Always
60
Example
curl "https://api.breachline.io/api/v1/usage/me" \
-H "Authorization: Bearer $BREACHLINE_API_KEY"
{
"scope": "user",
"scope_id": "string",
"since": "string",
"until": "string",
"totals": {
"input_tokens": 0,
"output_tokens": 0,
"total_tokens": 0,
"price_gbp": 0,
"requests": 0,
"p50_latency_ms": 0,
"p95_latency_ms": 0,
"cache_hit_rate_pct": 0
},
"daily": [
{
"date": "string",
"input_tokens": 0,
"output_tokens": 0,
"total_tokens": 0,
"price_gbp": 0,
"requests": 0
}
],
"rates": {}
}
List your recent requests
/api/v1/usage/me/logs The per-request activity log. Metadata only; prompts and responses are never stored in it.
Authentication
- API key in X-API-Key
- API key or session token in Authorization: Bearer
Query parameters
limitinteger- Default
20- Minimum
1- Maximum
100
offsetinteger- Default
0- Minimum
0
Responses
200Log entries, newest first.Body (application/json)
limitintegeroffsetintegerhas_morebooleanlogsarray of objects11 fields in
logsidstringcreated_atstring (date-time)endpointstring- Examples
/api/v1/llm/v1/chat/completions
tierstringThe public Nebula model label.
input_tokensintegeroutput_tokensintegertotal_tokensintegerresponse_statusinteger or nullcache_read_tokensintegercache_write_tokensintegerlatency_msinteger or null
429A per-user limit was exceeded (the Platform API, embeddings or rerank). This response does not use the error envelope. Wait forRetry-Afterseconds.Headers
X-Request-IDstringThe request's correlation id (yours, or one BreachLine generated). Quote it to support.
Retry-AfterintegerSeconds to wait before retrying.
Body (application/json)
detailstring Requiredretry_afterinteger Required- Always
60
Example
curl "https://api.breachline.io/api/v1/usage/me/logs" \
-H "Authorization: Bearer $BREACHLINE_API_KEY"
{
"limit": 0,
"offset": 0,
"has_more": true,
"logs": [
{
"id": "string",
"created_at": "2026-11-11T00:00:00Z",
"endpoint": "/api/v1/llm/v1/chat/completions",
"tier": "string",
"input_tokens": 0,
"output_tokens": 0,
"total_tokens": 0,
"response_status": 0,
"cache_read_tokens": 0,
"cache_write_tokens": 0,
"latency_ms": 0
}
]
}
Get your budget burn
/api/v1/usage/me/budget Token burn for the current day or month window, plus an error-rate breakdown.
Authentication
- API key in X-API-Key
- API key or session token in Authorization: Bearer
Query parameters
windowstringBudget window.
- One of
daymonth- Default
day
sincestringISO-8601 start of the window (inclusive). A date without a time zone is read as UTC.
- Examples
2026-11-01
untilstringISO-8601 end of the window (exclusive).
- Examples
2026-11-11
Responses
200Budget view.Body (application/json)
budgetobject5 fields in
budgetscopestringscope_idstring or nullwindowstring- One of
daymonth
window_startstring (date-time)window_endstring (date-time)
error_rate_by_modelarray of objects
429A per-user limit was exceeded (the Platform API, embeddings or rerank). This response does not use the error envelope. Wait forRetry-Afterseconds.Headers
X-Request-IDstringThe request's correlation id (yours, or one BreachLine generated). Quote it to support.
Retry-AfterintegerSeconds to wait before retrying.
Body (application/json)
detailstring Requiredretry_afterinteger Required- Always
60
Example
curl "https://api.breachline.io/api/v1/usage/me/budget" \
-H "Authorization: Bearer $BREACHLINE_API_KEY"
{
"budget": {
"scope": "string",
"scope_id": "string",
"window": "day",
"window_start": "2026-11-11T00:00:00Z",
"window_end": "2026-11-11T00:00:00Z"
},
"error_rate_by_model": [
{}
]
}
Get your spend cap
/api/v1/usage/me/budget/cap Authentication
- API key in X-API-Key
- API key or session token in Authorization: Bearer
Responses
200The cap, or nulls when none is set.Body (application/json)
cap_gbpnumber or nullwindowstring or null- One of
daymonthnull
429A per-user limit was exceeded (the Platform API, embeddings or rerank). This response does not use the error envelope. Wait forRetry-Afterseconds.Headers
X-Request-IDstringThe request's correlation id (yours, or one BreachLine generated). Quote it to support.
Retry-AfterintegerSeconds to wait before retrying.
Body (application/json)
detailstring Requiredretry_afterinteger Required- Always
60
Example
curl "https://api.breachline.io/api/v1/usage/me/budget/cap" \
-H "Authorization: Bearer $BREACHLINE_API_KEY"
{
"cap_gbp": 0,
"window": "day"
}
Set your spend cap
/api/v1/usage/me/budget/cap A self-service ceiling on retail GBP spend per day or month. Once the window's spend reaches it, LLM requests get 402 until the window resets or the cap is raised. Requires the settings:write member scope.
Authentication
- API key in X-API-Key
- API key or session token in Authorization: Bearer
Query parameters
max_gbpnumber Required- Greater than
0
windowstringBudget window.
- One of
daymonth- Default
day
Responses
200Saved.Body (application/json)
okbooleancap_gbpnumberwindowstring- One of
daymonth
429A per-user limit was exceeded (the Platform API, embeddings or rerank). This response does not use the error envelope. Wait forRetry-Afterseconds.Headers
X-Request-IDstringThe request's correlation id (yours, or one BreachLine generated). Quote it to support.
Retry-AfterintegerSeconds to wait before retrying.
Body (application/json)
detailstring Requiredretry_afterinteger Required- Always
60
Example
curl -X PUT "https://api.breachline.io/api/v1/usage/me/budget/cap?max_gbp=0" \
-H "Authorization: Bearer $BREACHLINE_API_KEY"
{
"ok": true,
"cap_gbp": 0,
"window": "day"
}
Remove your spend cap
/api/v1/usage/me/budget/cap Requires the settings:write member scope.
Authentication
- API key in X-API-Key
- API key or session token in Authorization: Bearer
Responses
200Removed.429A per-user limit was exceeded (the Platform API, embeddings or rerank). This response does not use the error envelope. Wait forRetry-Afterseconds.Headers
X-Request-IDstringThe request's correlation id (yours, or one BreachLine generated). Quote it to support.
Retry-AfterintegerSeconds to wait before retrying.
Body (application/json)
detailstring Requiredretry_afterinteger Required- Always
60
Example
curl -X DELETE "https://api.breachline.io/api/v1/usage/me/budget/cap" \
-H "Authorization: Bearer $BREACHLINE_API_KEY"
Get organization usage
/api/v1/usage/org/{org_id} Usage for an organization you are a member of.
Authentication
- API key in X-API-Key
- API key or session token in Authorization: Bearer
Path parameters
org_idstring RequiredOrganization id.
Query parameters
sincestringISO-8601 start of the window (inclusive). A date without a time zone is read as UTC.
- Examples
2026-11-01
untilstringISO-8601 end of the window (exclusive).
- Examples
2026-11-11
group_by_dayboolean- Default
true
Responses
200The usage summary.Body (application/json)
scopestring- One of
userorg
scope_idstring or nullsincestring or nulluntilstring or nulltotalsobject8 fields in
totalsinput_tokensintegeroutput_tokensintegertotal_tokensintegerprice_gbpnumberCustomer charge for the window, in GBP.
requestsintegerp50_latency_msnumber or nullp95_latency_msnumber or nullcache_hit_rate_pctnumber or null
dailyarray of objects6 fields in
dailydatestringYYYY-MM-DD (UTC).
input_tokensintegeroutput_tokensintegertotal_tokensintegerprice_gbpnumberrequestsinteger
ratesobject
429A per-user limit was exceeded (the Platform API, embeddings or rerank). This response does not use the error envelope. Wait forRetry-Afterseconds.Headers
X-Request-IDstringThe request's correlation id (yours, or one BreachLine generated). Quote it to support.
Retry-AfterintegerSeconds to wait before retrying.
Body (application/json)
detailstring Requiredretry_afterinteger Required- Always
60
Example
curl "https://api.breachline.io/api/v1/usage/org/{org_id}" \
-H "Authorization: Bearer $BREACHLINE_API_KEY"
{
"scope": "user",
"scope_id": "string",
"since": "string",
"until": "string",
"totals": {
"input_tokens": 0,
"output_tokens": 0,
"total_tokens": 0,
"price_gbp": 0,
"requests": 0,
"p50_latency_ms": 0,
"p95_latency_ms": 0,
"cache_hit_rate_pct": 0
},
"daily": [
{
"date": "string",
"input_tokens": 0,
"output_tokens": 0,
"total_tokens": 0,
"price_gbp": 0,
"requests": 0
}
],
"rates": {}
}
List organization requests
/api/v1/usage/org/{org_id}/logs Authentication
- API key in X-API-Key
- API key or session token in Authorization: Bearer
Path parameters
org_idstring RequiredOrganization id.
Query parameters
limitinteger- Default
20- Minimum
1- Maximum
100
offsetinteger- Default
0- Minimum
0
Responses
200Log entries, newest first.Body (application/json)
limitintegeroffsetintegerhas_morebooleanlogsarray of objects11 fields in
logsidstringcreated_atstring (date-time)endpointstring- Examples
/api/v1/llm/v1/chat/completions
tierstringThe public Nebula model label.
input_tokensintegeroutput_tokensintegertotal_tokensintegerresponse_statusinteger or nullcache_read_tokensintegercache_write_tokensintegerlatency_msinteger or null
429A per-user limit was exceeded (the Platform API, embeddings or rerank). This response does not use the error envelope. Wait forRetry-Afterseconds.Headers
X-Request-IDstringThe request's correlation id (yours, or one BreachLine generated). Quote it to support.
Retry-AfterintegerSeconds to wait before retrying.
Body (application/json)
detailstring Requiredretry_afterinteger Required- Always
60
Example
curl "https://api.breachline.io/api/v1/usage/org/{org_id}/logs" \
-H "Authorization: Bearer $BREACHLINE_API_KEY"
{
"limit": 0,
"offset": 0,
"has_more": true,
"logs": [
{
"id": "string",
"created_at": "2026-11-11T00:00:00Z",
"endpoint": "/api/v1/llm/v1/chat/completions",
"tier": "string",
"input_tokens": 0,
"output_tokens": 0,
"total_tokens": 0,
"response_status": 0,
"cache_read_tokens": 0,
"cache_write_tokens": 0,
"latency_ms": 0
}
]
}
Get organization budget burn
/api/v1/usage/org/{org_id}/budget Authentication
- API key in X-API-Key
- API key or session token in Authorization: Bearer
Path parameters
org_idstring RequiredOrganization id.
Query parameters
windowstringBudget window.
- One of
daymonth- Default
day
sincestringISO-8601 start of the window (inclusive). A date without a time zone is read as UTC.
- Examples
2026-11-01
untilstringISO-8601 end of the window (exclusive).
- Examples
2026-11-11
Responses
200Budget view.Body (application/json)
budgetobject5 fields in
budgetscopestringscope_idstring or nullwindowstring- One of
daymonth
window_startstring (date-time)window_endstring (date-time)
error_rate_by_modelarray of objects
429A per-user limit was exceeded (the Platform API, embeddings or rerank). This response does not use the error envelope. Wait forRetry-Afterseconds.Headers
X-Request-IDstringThe request's correlation id (yours, or one BreachLine generated). Quote it to support.
Retry-AfterintegerSeconds to wait before retrying.
Body (application/json)
detailstring Requiredretry_afterinteger Required- Always
60
Example
curl "https://api.breachline.io/api/v1/usage/org/{org_id}/budget" \
-H "Authorization: Bearer $BREACHLINE_API_KEY"
{
"budget": {
"scope": "string",
"scope_id": "string",
"window": "day",
"window_start": "2026-11-11T00:00:00Z",
"window_end": "2026-11-11T00:00:00Z"
},
"error_rate_by_model": [
{}
]
}