Organisation AI usage breakdown (subscription page parity)
GET
/api/v3/organizations/{organisation}/ai/usage
const url = 'https://dashboard.quantcdn.io/api/v3/organizations/example/ai/usage?groupBy=model&include=daily';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://dashboard.quantcdn.io/api/v3/organizations/example/ai/usage?groupBy=model&include=daily'AI usage from the subscription page’s source (cloud-api monthly-usage). Parameterized by month, groupBy (model|user|token) and optional daily series. NOTE: as of API 4.19.0 this endpoint requires the update_subscription permission + subscription:read scope (previously use_ai_services + ai:use). For per-caller spend use /ai/usage/me.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”organisation
required
string
Query Parameters
Section titled “Query Parameters”month
string
YYYY-MM, defaults to current month
groupBy
string
include
string
Set to ‘daily’ to append a 30-day series
userId
string
Scope the daily series to a user
tokenId
string
Scope the daily series to a token
Responses
Section titled “Responses”Usage breakdown
Missing update_subscription permission or subscription:read scope
Invalid groupBy
Failed to fetch usage data
