Get 30-day usage histogram for a company
curl --request GET \
--url https://paradigm.lighton.ai/api/v3/instance/companies/{id}/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://paradigm.lighton.ai/api/v3/instance/companies/{id}/usage"
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/instance/companies/{id}/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"currency": "<string>",
"days": [
{
"date": "2023-12-25",
"usage": {}
}
],
"total_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>"
]
}Usage
Get 30-day usage histogram for a company
Return a per-day breakdown of metered usage over the last 30 days (oldest first) for a given company, aggregated across all non-revoked API keys of every user in that company. Includes a total_cost field with the cumulative spend.
Authorization: the authenticated user must have instance-level company-view permission (SysAdmin, Account Manager, or DPO Admin).
GET
/
api
/
v3
/
instance
/
companies
/
{id}
/
usage
Get 30-day usage histogram for a company
curl --request GET \
--url https://paradigm.lighton.ai/api/v3/instance/companies/{id}/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://paradigm.lighton.ai/api/v3/instance/companies/{id}/usage"
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/instance/companies/{id}/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"currency": "<string>",
"days": [
{
"date": "2023-12-25",
"usage": {}
}
],
"total_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.
Path Parameters
Query Parameters
Start date for the billing window (ISO yyyy-mm-dd). Scopes both days and total_cost to this window — without it, days covers the last 30 days.
End date for the billing window (ISO yyyy-mm-dd, inclusive). Scopes both days and total_cost.