Usage & Billing

API usage summaries, quotas, and per-key breakdown. Monitor your consumption, track overages, and manage your billing across all API keys.

Endpoints

MethodEndpointDescriptionScope
GET/usage/summaryGet current billing period usage summaryusage:read
GET/usage/detailsGet itemized usage records with paginationusage:read
GET/usage/by-keyGet usage breakdown per API keyusage:read

Query Parameters

GET /usage/summary

ParameterTypeDescription
billingPeriodstringBilling period in YYYY-MM format (defaults to current period)

GET /usage/details

ParameterTypeDescription
billingPeriodstringBilling period in YYYY-MM format (defaults to current period)
pageintegerPage number (default: 1)
pageSizeintegerItems per page (default: 25, max: 100)

GET /usage/by-key

ParameterTypeDescription
billingPeriodstringBilling period in YYYY-MM format (defaults to current period)

Example Requests

Get current period usage summary:

curl https://api.auralytik.com/v1/usage/summary \
  -H "Authorization: Bearer YOUR_API_KEY"

Get usage for a specific billing period:

curl https://api.auralytik.com/v1/usage/details?billingPeriod=2024-01&page=1&pageSize=50 \
  -H "Authorization: Bearer YOUR_API_KEY"

Get per-key usage breakdown:

curl https://api.auralytik.com/v1/usage/by-key?billingPeriod=2024-01 \
  -H "Authorization: Bearer YOUR_API_KEY"

Summary Response

{
  "billingPeriod": "2024-01",
  "tier": "professional",
  "usage": {
    "calls": {
      "used": 8420,
      "included": 10000,
      "overage": 0
    },
    "webhooks": {
      "used": 15200,
      "included": 50000,
      "overage": 0
    },
    "storage_gb": {
      "used": 12.4,
      "included": 25.0,
      "overage": 0
    }
  }
}

Per-Key Breakdown Response

{
  "billingPeriod": "2024-01",
  "keys": [
    {
      "keyId": "ak_prod_abc123",
      "name": "Production API Key",
      "calls": 6100,
      "lastUsedAt": "2024-01-31T23:45:00Z"
    },
    {
      "keyId": "ak_stg_def456",
      "name": "Staging API Key",
      "calls": 2320,
      "lastUsedAt": "2024-01-31T18:20:00Z"
    }
  ]
}

Usage alerts and invoices coming soon

Usage threshold alerts, invoice retrieval, and cost forecasting APIs are being developed.

Request API Access