/spend/overview) gives the total; this gives its composition with respect to models. A model is an AI model the organization has set up and has in use, and each row covers one model across the whole window.billing_period, or nothing at all, to report over a single calendar month.start_date and end_date together to report over an explicit span of days.organization_id: The Ejento AI organization ID.billing_period: Defines the billing period in YYYY-MM format. Defaults to the current month.start_date, end_date: Define the inclusive bounds of a date range in YYYY-MM-DD format. Both are always supplied together, in place of billing_period. Supplying a period and a range together, an end date earlier than its start, or a range longer than 92 days each return a 400.sort_by: Chooses the field that orders the results: spend, total_tokens, or model. Prefix it with - for descending. Defaults to -spend, which puts the most expensive model first. Any other value is refused with a 400.query: Narrows the list to models whose name contains this text, matched case-insensitively against the model value in the response. Empty by default, which returns every model.paginated: Chooses whether the response carries the whole result set or a single page. Defaults to false, which returns everything and leaves meta null.page: Selects which page to return. It applies only when paginated is true.items_per_page: Sets how many models each page carries, from 1 to 100. It applies only when paginated is true.items, with pagination meta when paginated, in a success envelope.curl --location --globoff 'https:///metering-service/api/v2/organizations//spend/by-model?billing_period=undefined&start_date=undefined&end_date=undefined&paginated=undefined&page=undefined&items_per_page=undefined&sort_by=undefined&query=undefined' \
--header 'Ocp-Apim-Subscription-Key: ' \
--header 'Authorization: Bearer '{
"success": true,
"message": "string",
"data": {
"items": [
{
"model": "string",
"spend": "string",
"input_tokens": 0,
"output_tokens": 0,
"total_tokens": 0,
"unit": "TOKENS"
}
],
"meta": {
"count": 0,
"current_page": 0,
"num_pages": 0
}
}
}