Usage metrics with the Admin API
The Admin API exposes two kinds of consumption data:
- Billing usage: cost and consumption for your Organization over a billing period.
- Product analytics: le Chat activity and Vibe Code usage metrics over a time range.
Before you start
You need an Admin API key created in the Backoffice. Every request uses the base URL https://console.mistral.ai/api/admin and the x-api-key header. See Admin API authentication.
Billing usage
Retrieve cost and consumption for the Organization. The month, year, and workspace_id parameters are optional. month and year are whole numbers, so 5 and 05 both work.
curl "https://console.mistral.ai/api/admin/usage?month=5&year=2026" \
-H "x-api-key: $ADMIN_API_KEY"The response breaks consumption down by category (chat, completion, ocr, audio, connectors, libraries_api, fine_tuning, and vibe_usage), together with the period (start_date, end_date) and the currency.
Spending and rate limits
Read the current Organization limits:
# Spend limits
curl https://console.mistral.ai/api/admin/spend-limit \
-H "x-api-key: $ADMIN_API_KEY"
# Rate limits (requests per second and per-model token limits)
curl https://console.mistral.ai/api/admin/rate-limit \
-H "x-api-key: $ADMIN_API_KEY"Set the Organization's monthly spending limit:
curl -X POST https://console.mistral.ai/api/admin/spend-limit \
-H "Content-Type: application/json" \
-H "x-api-key: $ADMIN_API_KEY" \
-d '{"amount": 500, "no_monthly_limit": false}'amount: the monthly limit, as a whole number in your Organization's billing currency (500means 500, not 500 cents).no_monthly_limit: set totrueto remove the cap.
See Usage limits for the concept.
le Chat analytics
The /analytics/lechat endpoints report le Chat messaging activity. All of them take start_time and end_time as Unix timestamps in seconds.
By user
curl "https://console.mistral.ai/api/admin/analytics/lechat/usage/by_user_stats?start_time=1704067200&end_time=1706745600" \
-H "x-api-key: $ADMIN_API_KEY"Returns, per user: message, file, image, and spreadsheet counts; unique conversations; unique agents; messages sent to agents; and the last message timestamp.
By agent
curl "https://console.mistral.ai/api/admin/analytics/lechat/usage/by_agent_stats?start_time=1704067200&end_time=1706745600" \
-H "x-api-key: $ADMIN_API_KEY"Returns the same activity counts grouped by agent, plus the number of unique users per agent.
Over time
Add granularity (hour, day, week, or month) to bucket the results.
curl "https://console.mistral.ai/api/admin/analytics/lechat/usage/by_time_stats?start_time=1704067200&end_time=1706745600&granularity=day" \
-H "x-api-key: $ADMIN_API_KEY"Returns activity counts per time bucket, including unique users and unique agents.
Vibe Code analytics
The /analytics/vibe endpoints report Vibe Code activity. They take start_time and end_time as Unix timestamps in seconds.
By workspace
Pass workspace_id to scope the report to a single workspace, or omit it for all workspaces.
curl "https://console.mistral.ai/api/admin/analytics/vibe/usage/by_workspace?start_time=1704067200&end_time=1706745600" \
-H "x-api-key: $ADMIN_API_KEY"Returns daily series for sessions (CLI, ACP, programmatic), active users, consumed tokens (input, output, and cached, per model), tool calls, and session durations.
By Organization
curl "https://console.mistral.ai/api/admin/analytics/vibe/usage/by_organization?start_time=1704067200&end_time=1706745600" \
-H "x-api-key: $ADMIN_API_KEY"Returns daily series for next-edit suggestions (by outcome), next-edit active users, and modified lines of code.