Skip to content
Last updated

Retrieve detailed usage information for a specific API key in a given month.

GEThttps://api.aitronos.com/v1/analytics/api-keys/usage/{org_id}/{api_key_id}

Path Parameters

org_id string required

The organization ID (format: org_<uuid>).

api_key_id string required

The API key ID (format: apikey_<uuid>).

Query Parameters

month integer optional

Month to query (1-12). Defaults to current month.

year integer optional

Year to query. Defaults to current year.

Returns

Returns detailed usage information for the specified API key, including total requests, costs, synapses, neurons, and limit information.

Bash
curl "https://api.aitronos.com/v1/analytics/api-keys/usage/org_abc123/apikey_def456?month=11&year=2025" \
  -H "X-API-Key: $FREDDY_API_KEY"

Response:

{
  "apiKeyId": "apikey_abc123",
  "apiKeyName": "Production Key",
  "organizationId": "org_123",
  "month": 11,
  "year": 2025,
  "usage": {
    "totalRequests": 1250,
    "totalCost": 350.25,
    "totalSynapses": 125000,
    "totalNeurons": 2500000,
    "averageCostPerRequest": 0.28
  },
  "limit": {
    "monthlyLimit": 500.00,
    "utilizationPercentage": 70.05,
    "remainingBudget": 149.75,
    "status": "ok"
  }
}