GET/api/orgs/{org_id}/usage/by-provider

Roll up usage per provider

One row per customer-facing provider; provider: null groups requests where nothing was dispatched.

認証: AuthorizationヘッダーにBearer形式のAPIキー

パスパラメータ

  • org_idstring必須

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

クエリパラメータ

  • windowenum

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

    "24h""7d""30d"
    デフォルト: "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"

レスポンス

  • 200

    Per-provider rollup.

    レスポンス
    • windowenum必須
      "24h""7d""30d"
    • providersarray<object>必須

      Highest charged plus estimated spend first.

      providers
      • providerstring | null必須

        Winning attempt's provider (masked house lanes read experiential_cloud); null groups requests where nothing was dispatched.

      • request_countinteger必須

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

      • error_countinteger必須

        Subset whose terminal state was not completed.

      • input_tokensinteger必須
      • output_tokensinteger必須
      • cost_usdnumber必須

        Charged platform credits, dollars.

      • estimated_cost_usdnumber必須

        Never-charged BYOK estimate at list price, dollars.

      • free_usdnumber必須

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

      • last_used_atstring必須
  • 400

    Unknown window or lane, or a malformed api_key_id.

    レスポンス
    • errorstring必須

      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.

    レスポンス
    • errorstring必須

      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.

    レスポンス
    • errorstring必須

      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.

    レスポンス
    • errorstring必須

      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.

    レスポンス
    • errorstring必須

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

リクエスト

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

レスポンス

{
  "window": "7d",
  "providers": [
    {
      "provider": "experiential_cloud",
      "request_count": 10220,
      "error_count": 38,
      "input_tokens": 41204410,
      "output_tokens": 3120400,
      "cost_usd": 18.42,
      "estimated_cost_usd": 0,
      "free_usd": 1.1,
      "last_used_at": "2026-11-18T14:32:07.481Z"
    },
    {
      "provider": null,
      "request_count": 61,
      "error_count": 61,
      "input_tokens": 0,
      "output_tokens": 0,
      "cost_usd": 0,
      "estimated_cost_usd": 0,
      "free_usd": 0,
      "last_used_at": "2026-11-18T11:02:40Z"
    }
  ]
}

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