GET/api/orgs/{org_id}/usage/timeseries

Get bucketed usage over a window

Per (bucket, model, lane) cells; every filter composes. request_count includes errors and pre-dispatch refusals. API-key reads share the per-organization request-log read limit.

Authentication: Bearer API key in the Authorization header

Path parameters

  • org_idstringrequired

    Your organization id (uuid). GET /api/whoami returns it.

Query parameters

  • windowenum

    Lookback window ending now. 24h buckets hourly, 7d and 30d daily.

    "24h""7d""30d"
    Default: "7d"
  • modelstring

    Restrict to one model slug (the alias the caller requested).

  • api_key_idstring

    Restrict to one API key (uuid).

  • laneenum

    Restrict to one money lane: platform (platform credits) or byok (your own provider key, never charged). A lane cut excludes requests where nothing was dispatched.

    "platform""byok"
  • compareboolean

    Add previous: totals of the period of the same length just before the window.

    Default: false

Responses

  • 200

    Buckets.

    Response
    • windowenumrequired
      "24h""7d""30d"
    • bucket_secondsintegerrequired

      3600 for 24h, 86400 otherwise.

    • bucketsarray<object>required
      buckets
      • bucket_startstringrequired
      • modelstringrequired
      • laneenumrequired

        Null when nothing was dispatched for the cell's requests.

        "platform""byok"null
      • request_countintegerrequired

        Every finished request, errors and pre-dispatch refusals included.

      • error_countintegerrequired

        Subset whose terminal state was not completed.

      • input_tokensintegerrequired
      • output_tokensintegerrequired
      • cached_input_tokensintegerrequired

        Subset of input_tokens read from the provider cache.

      • cost_usdnumberrequired

        Charged platform credits, dollars.

      • estimated_cost_usdnumberrequired

        Never-charged BYOK estimate at list price, dollars.

      • free_usdnumberrequired

        List-price value of promotion-funded usage, dollars (never charged).

    • previousobject | null

      Present only with compare=true.

      One of

      object

      • request_countintegerrequired

        Every finished request, errors and pre-dispatch refusals included.

      • error_countintegerrequired

        Subset whose terminal state was not completed.

      • input_tokensintegerrequired
      • output_tokensintegerrequired
      • cached_input_tokensintegerrequired
      • cost_usdnumberrequired

        Charged platform credits, dollars.

      • estimated_cost_usdnumberrequired

        Never-charged BYOK estimate at list price, dollars.

      • free_usdnumberrequired

        List-price value of promotion-funded usage, dollars (never charged).

  • 400

    Unknown window or lane, or a malformed api_key_id.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 401

    Missing, unknown or revoked API key.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 404

    Unknown organization, or not the key's own organization.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 429

    Too many reads. rate_limited: this organization's API-key reads of the request log are over about 10 per second (burst 30) or 4 in flight on one server (sessions are not limited). build_capacity: the shared analytics read slots are busy. Retry after Retry-After.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 503

    Usage analytics are temporarily unavailable. Retry shortly.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

Request

curl https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/usage/timeseries?window=24h&model=gpt-6-luna&api_key_id=6b1d2f4e-3c8a-4f0e-9a21-7e5c0d9b4a33&lane=platform&compare=true \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "window": "24h",
  "bucket_seconds": 3600,
  "buckets": [
    {
      "bucket_start": "2026-11-18T14:00:00Z",
      "model": "gpt-6-luna",
      "lane": "platform",
      "request_count": 212,
      "error_count": 3,
      "input_tokens": 880412,
      "output_tokens": 61220,
      "cached_input_tokens": 702100,
      "cost_usd": 0.412,
      "estimated_cost_usd": 0,
      "free_usd": 0
    }
  ],
  "previous": {
    "request_count": 4980,
    "error_count": 41,
    "input_tokens": 20114200,
    "output_tokens": 1402200,
    "cached_input_tokens": 15800400,
    "cost_usd": 9.88,
    "estimated_cost_usd": 1.2,
    "free_usd": 0.4
  }
}

https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/usage/timeseries?window=24h&model=gpt-6-luna&api_key_id=6b1d2f4e-3c8a-4f0e-9a21-7e5c0d9b4a33&lane=platform&compare=true