beta.admin.billing
Detailed Usage Query
Changed onQuery the organization's detailed usage for a required time range.
Optional filters, caller-selected grouping and time buckets, pagination, aggregates, and distinct API-call counts are supported. The response contains usage quantities only; it does not include prices, currency, or calculated costs. For a fixed monthly report with pricing, use GET /v1/admin/usage.
post/v1/admin/usage/query
Request
- Base URLhttps://api.mistral.ai
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"usage_type": [
"usage",
"ocr"
],
"billing_metric": [
"mistral-large"
],
"billing_display_name": [
"mistral-large-latest"
],
"billing_group": [
"input",
"output"
],
"workspace_ids": [
"8b1f9229-42c0-4511-9d54-5f860f04d17a",
null
],
"organization_id": [
"82e9b991-90ed-4c5f-b8b4-b69141d41c84"
],
"user_id": [
"7f8c8b54-bf28-470e-97ef-18d40d37e537"
],
"service_account_id": [
"3d77300f-67db-498b-98d2-e751635b4fcb"
],
"api_key_id": [
"b40f2e87-24f1-42ed-b196-f5e79203f989"
],
"api_zone": [
"us",
"eu"
],
"service_tier": [
"standard",
"priority"
],
"start": "2026-08-01T00:00:00Z",
"end": "2026-09-01T00:00:00Z",
"filters": [
{
"field": "billing_display_name",
"operator": "is_not",
"values": [
"mistral-small-latest"
]
}
],
"group_by": [
"usage_type",
"billing_metric",
"billing_group"
],
"time_bucket": "day",
"limit": 1000,
"include_aggregates": true,
"include_nb_api_calls": true
}Response
Successful Response
Example response
{
"groups": [],
"aggregates": {
"total_value": 1500,
"total_count": 12,
"total_api_calls": 10,
"customer_count": 1,
"usage_type_count": 2
},
"metadata": {
"query_params": {
"usage_type": [
"usage",
"ocr"
],
"billing_metric": [
"mistral-large"
],
"billing_display_name": [
"mistral-large-latest"
],
"billing_group": [
"input",
"output"
],
"workspace_ids": [
"8b1f9229-42c0-4511-9d54-5f860f04d17a",
null
],
"organization_id": [
"82e9b991-90ed-4c5f-b8b4-b69141d41c84"
],
"user_id": [
"7f8c8b54-bf28-470e-97ef-18d40d37e537"
],
"service_account_id": [
"3d77300f-67db-498b-98d2-e751635b4fcb"
],
"api_key_id": [
"b40f2e87-24f1-42ed-b196-f5e79203f989"
],
"api_zone": [
"us",
"eu"
],
"service_tier": [
"standard",
"priority"
],
"start": "2026-08-01T00:00:00Z",
"end": "2026-09-01T00:00:00Z",
"customer_id": "69bc23d6-4db3-47ad-9cce-bda1b24509f2",
"filters": [
{
"field": "billing_metric",
"operator": "is",
"values": [
"mistral-large"
]
}
],
"group_by": [
"usage_type",
"billing_metric"
],
"time_bucket": "day",
"limit": 1000,
"include_nb_api_calls": true
}
}
}Changes
- info
endpoint added
- info