Skip to content
Last updated

🔨 In Development — This section is still being developed and may change.
Retrieve detailed spend and request metrics for a specific API key within an organization.
GEThttps://api.freddy.aitronos.com/v1/analytics/{org_id}/api-keys/{api_key_id}/{month}/{year}

Path Parameters

orgId string required

Unique organization identifier (format: ORG_ + 16 chars).

apiKeyId string required

API key identifier (ak_...).

month integer required

Target billing month (1-12).

year integer required

Target billing year (e.g., 2025).

Query Parameters

period string optional · Defaults to daily

Aggregation granularity. One of: daily, weekly, monthly.

Authentication

  • Authorization: Bearer $FREDDY_API_KEY

Returns

Spend summary plus per-period breakdown for the requested API key.

Bash
curl "https://api.freddy.aitronos.com/v1/analytics/ORG_B66136CBB1304C98/api-keys/ak_5daf103fe74c8603/10/2025?period=daily" \
-H "Authorization: Bearer $FREDDY_API_KEY"

Response

{
  "organizationId": "ORG_B66136CBB1304C98",
  "apiKeyId": "ak_5daf103fe74c8603",
  "period": {
    "month": 10,
    "year": 2025,
    "periodDisplay": "October 2025"
  },
  "usageData": {
    "apiKeyName": "Production API Key",
    "totalCost": 1250.45,
    "totalRequests": 8923,
    "currency": "CHF"
  },
  "breakdown": [
    {
      "date": "2025-10-01",
      "cost": 34.56,
      "requests": 156
    },
    {
      "date": "2025-10-02",
      "cost": 41.23,
      "requests": 189
    }
  ],
  "summary": {
    "totalUsage": 1250.45,
    "totalRequests": 8923,
    "averageDailyCost": 41.67,
    "averageDailyRequests": 297.43
  }
}