Usage Report API Reference
The Usage Reports API allows administrators to retrieve detailed API usage data across models, API keys, projects, and departments over a specified time period. The report can be aggregated at different time intervals to support monitoring, analysis, and cost tracking.
Use Cases
-
Monitoring daily or hourly API usage
-
Department- or project-level usage tracking
This API is accessible only using an admin API key.
For Administrator API Key, write to the Compass Support Team, compass.support@core42.ai.
Request Method:
POST https://api.core42.ai/logs/v1/admin/usage_reports
Authentication
Include your admin API key in the request header.
Required Header: api-key: <your_admin_key>
Request Headers
| Header Name | Value | Required |
| api-key | Admin API key | Yes |
| Content-Type | application/json | Yes |
Sample Request
curl -X POST "https://api.core42.ai/logs/v1/admin/usage_reports" \
-H "api-key: your_admin_key" \
-H "Content-Type: application/json" \
-d '{
"model_ids": ["gpt-4o", "gpt-5"],
"api_key_name": "all",
"start_date": "2025-12-01",
"end_date": "2026-02-04",
"interval": "per_day",
"department": "test_dept_123",
"project": "test_project_1234567"
}'
Request Body Parameters
| Parameter | Required | Type | Description |
model_ids |
Yes |
List of strings | Specifies the models for which usage data is required. |
api_key_name |
No |
String | Filters usage by a specific API key. |
project |
No |
String | Filters usage by project. The default is all. |
depatment |
No |
String | Filters usage by department. The default is all. |
start_date |
Yes |
Date (YYYY-MM-DD) | Start date for the usage report period. |
end_date |
Yes |
Date (YYYY-MM-DD) |
End date for the usage report period. |
interval |
Yes |
String |
Time granularity for aggregating usage data. The allowed values are |
Notes & Best Practices
-
start_datemust be earlier than or equal toend_date. -
When optional filters (
api_key_name,project,department) are not provided, the API returns usage data across all values.