POST/api/orgs/{org_id}/spend/activity

List Spend activity

Request-level (or attempt-level) rows under the report's full filter set, keyset paged by next_cursor. Metadata only, no captured bodies. With include_features: true the response is the source-discriminated page. API keys need provisioning strength and scope: org.

Authentication: Bearer API key in the Authorization header

Path parameters

  • org_idstringrequired

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

Request body

  • queryobjectrequired

    A bounded report slice. end is exclusive; the range is at most ten years. Omit as_of and snapshot_id for a fresh read; the response returns them frozen, and later reads (pagination, view, series, facets, activity, export) send them back unchanged so every panel reads one snapshot.

    query
    • startstringrequired

      Inclusive start, with a UTC offset.

    • endstringrequired

      Exclusive end, with a UTC offset. Must be after start.

    • time_zonestring

      IANA zone for day and month buckets.

      Default: "UTC"
    • scopeany
      Default: "org"
    • basisany
      Default: "requests"
    • group_byany
      Default: "model"
    • tag_keystring | null

      Required exactly when group_by is tag.

      Default: null
    • grainany
      Default: "day"
    • filtersarray<object>

      At most one filter per dimension.

      Default: []
      filters
      • dimensionenumrequired

        Grouping and filter dimension. key and member values are uuids. tag is only a group_by (with tag_key); filter tags through tags.

        "model""key""member""end_user""provider""funding""surface""outcome""error""app""prompt""tag""source"
      • valuesarray<string>
        Default: []
      • missingboolean

        Also match calls with no value for this dimension.

        Default: false
      • excludeboolean

        Invert the predicate. Must be a JSON boolean.

        Default: false
    • tagsarray<object>

      At most one predicate per tag key.

      Default: []
      tags
      • keystringrequired
      • valuesarray<string>
        Default: []
      • missingboolean

        Also match calls without this tag key.

        Default: false
      • excludeboolean
        Default: false
    • sortany
      Default: "spend"
    • directionenum
      "asc""desc"
      Default: "desc"
    • offsetinteger
      Default: 0
    • limitinteger
      Default: 50
    • as_ofstring | null

      Report cutoff. Server-set on the first read; not in the future and not before start.

      Default: null
    • snapshot_idstring

      Registered snapshot token. Requires its original as_of. Omitted from responses when unset.

  • cursorobject | null
    Default: null
    One of

    object

    • timestringrequired
    • idstringrequired
  • errors_onlyboolean
    Default: false
  • include_featuresboolean

    Also return feature debits (usage intelligence reports) as source: intelligence rows; every row then carries source.

    Default: false

Responses

  • 200

    OK

  • 400

    Invalid Spend query, or the query lacks the frozen snapshot this route requires.

    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).

  • 403

    The key is not a provisioning key (inference keys are refused on every Spend route, reads included), or it is a customer-plan 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

    The org is not the key's own organization (always 404, never 403).

    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).

  • 409

    The snapshot (as_of + snapshot_id) expired (24 hours) or was invalidated. Refresh and replace every projection together.

    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).

  • 422

    Body failed schema validation ({detail:[...]}), or the report exceeds a work bound (report_too_large, series_too_large, export_too_large).

  • 503

    Reporting is unavailable, initializing, or the bounded read timed out. Not empty data; retry or narrow the range.

    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 -X POST https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/spend/activity \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": {
    "start": "2026-11-01T00:00:00Z",
    "end": "2026-11-08T00:00:00Z",
    "time_zone": "UTC",
    "scope": "org",
    "basis": "requests",
    "group_by": "model",
    "grain": "day",
    "filters": [],
    "tags": [],
    "sort": "spend",
    "direction": "desc",
    "offset": 0,
    "limit": 50,
    "as_of": "2026-11-19T14:02:11.418Z",
    "snapshot_id": "c1e7a4d2-5b3f-4e8a-9d61-2f0b7c3a9e45"
  },
  "cursor": null,
  "errors_only": false,
  "include_features": false
}'

Response

{
  "query": {
    "start": "2026-11-01T00:00:00Z",
    "end": "2026-11-08T00:00:00Z",
    "time_zone": "UTC",
    "scope": "org",
    "basis": "requests",
    "group_by": "model",
    "grain": "day",
    "filters": [],
    "tags": [],
    "sort": "spend",
    "direction": "desc",
    "offset": 0,
    "limit": 50,
    "tag_key": null,
    "as_of": "2026-11-19T14:02:11.418Z",
    "snapshot_id": "c1e7a4d2-5b3f-4e8a-9d61-2f0b7c3a9e45"
  },
  "coverage": {
    "as_of": "2026-11-19T14:02:11.418Z",
    "projected_through": "2026-11-08T00:00:00Z",
    "complete": true,
    "pending_requests": 0,
    "includes_pre_admission_rejections": false
  },
  "rows": [
    {
      "id": "req_01JDX4K9T2V7",
      "request_id": "req_01JDX4K9T2V7",
      "created_at": "2026-11-03T09:41:07.212Z",
      "dimensions": {
        "model": "gpt-6-luna",
        "key": "9b1e3f20-6a4c-4d8e-a2f7-0c5d8e1b3a64",
        "provider": "openai",
        "funding": "platform_funded",
        "surface": "chat",
        "outcome": "completed"
      },
      "tags": {
        "team": "search"
      },
      "figures": {
        "count": 1,
        "rejected_count": 0,
        "errors": 0,
        "input_tokens": 5120,
        "output_tokens": 418,
        "cached_input_tokens": 4096,
        "reasoning_tokens": 0,
        "paid_nano_usd": "2710000",
        "byok_nano_usd": "0",
        "free_nano_usd": "0",
        "unknown_usage_count": 0
      },
      "detail": {
        "model": "gpt-6-luna",
        "provider": "openai",
        "lane": "platform_funded",
        "api_key_id": "9b1e3f20-6a4c-4d8e-a2f7-0c5d8e1b3a64",
        "key_label": "Acme backend",
        "status": "completed",
        "attempt_count": 1,
        "pricing_known": true,
        "latency_ms": 2140,
        "ttft_ms": 388,
        "tools_used": [],
        "failure_class": null,
        "error_message": null,
        "prompt_group": "4f1c9a2e7b30",
        "conversation_group": null,
        "attribution_label": null,
        "usage_evidence": {
          "usage_source": "observed",
          "input_tokens": 5120,
          "output_tokens": 418,
          "cached_input_tokens": 4096,
          "reasoning_tokens": 0,
          "no_dispatch": false,
          "cache_write_input_tokens": 0
        }
      }
    }
  ],
  "next_cursor": {
    "time": "2026-11-03T09:41:07.212Z",
    "id": "req_01JDX4K9T2V7"
  }
}

https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/spend/activity