Retrieve the top-performing API keys for an organization, ranked by total cost for a specified month.
GEThttps://api.aitronos.com/v1/analytics/{org_id}/api-keys/top/{month}/{year}
org_id string required
The organization ID.
month integer required
Month (1-12).
year integer required
Year (e.g., 2025).
limit integer
Number of top keys to return. Default: 10. Range: 1-100.
period string
Period type. Default: monthly. Options: daily, monthly.
Returns a list of top API keys with usage metrics including total requests, cost, synapses, and neurons.
Bash
- Bash
- Python
- JavaScript
curl "https://api.aitronos.com/v1/analytics/org_abc123/api-keys/top/11/2025?limit=5" \
-H "X-API-Key: $FREDDY_API_KEY"{
"organization_id": "org_abc123",
"period": {
"type": "monthly",
"month": 11,
"year": 2025,
"start_date": "2025-11-01",
"end_date": "2025-11-30"
},
"top_keys": [
{
"api_key_id": "ak_xyz789",
"key_name": "Production API Key",
"total_requests": 15420,
"total_cost": 245.67,
"total_synapses": 1250000.0,
"total_neurons": 850000.0
},
{
"api_key_id": "ak_abc456",
"key_name": "Development Key",
"total_requests": 8930,
"total_cost": 142.35,
"total_synapses": 720000.0,
"total_neurons": 490000.0
},
{
"api_key_id": "ak_def123",
"key_name": "Testing Key",
"total_requests": 3210,
"total_cost": 48.92,
"total_synapses": 280000.0,
"total_neurons": 195000.0
}
],
"total_keys": 3,
"limit": 5
}