curl --request GET \
--url https://paradigm.lighton.ai/api/v3/usage/current-period \
--header 'Authorization: Bearer <token>'import requests
url = "https://paradigm.lighton.ai/api/v3/usage/current-period"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://paradigm.lighton.ai/api/v3/usage/current-period', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"currency": "<string>",
"period_start": "2023-12-25",
"next_period_start": "2023-12-25",
"total_cost": "<string>",
"by_feature": [
{
"feature": "<string>",
"cost": "<string>"
}
]
}{
"detail": "System is under maintenance.",
"error": "service_maintenance",
"mode": "full_shutdown",
"reason": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"endpoint_category_names": [
"<string>"
]
}Get spend for the open billing period
Recap what the caller’s company has accrued in the billing period now open: a total_cost plus a per-feature breakdown, highest cost first.
Billing periods are calendar months, so the period runs from period_start to the day before next_period_start — the date this period’s invoice is issued.
The figures come from the same code paths that build the invoice: metered counters (parsing, ingestion, extraction, search, rag) summed over the period, plus storage as a peak-based GiB charge net of the free allowance. Two caveats keep this an estimate rather than a promise: usage recorded moments ago may still be settling, and an invoice also sweeps up usage that belongs to an earlier period but only became queryable after that period closed.
Company-wide, not per-user or per-API-key. Free-tier companies are not billed — use GET /api/v3/credits for their remaining allowance instead.
curl --request GET \
--url https://paradigm.lighton.ai/api/v3/usage/current-period \
--header 'Authorization: Bearer <token>'import requests
url = "https://paradigm.lighton.ai/api/v3/usage/current-period"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://paradigm.lighton.ai/api/v3/usage/current-period', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"currency": "<string>",
"period_start": "2023-12-25",
"next_period_start": "2023-12-25",
"total_cost": "<string>",
"by_feature": [
{
"feature": "<string>",
"cost": "<string>"
}
]
}{
"detail": "System is under maintenance.",
"error": "service_maintenance",
"mode": "full_shutdown",
"reason": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"endpoint_category_names": [
"<string>"
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
ISO 4217 code applied to every cost in the response
First day of the billing period now open (UTC)
First day of the next billing period — when this period's invoice is issued
Sum of by_feature, in currency
Per-feature breakdown, highest cost first. Features with no usage are omitted, so an unused period returns an empty list and a total_cost of 0
Show child attributes
Show child attributes