GET/api/gateway/keys/{api_key_id}/limits

Read one key's effective limits

Returns the spend cap and request/token windows that govern this key on platform-funded lanes, defaults included. source: tier means the windows come from the organization's rate-limit tier; explicit means a per-key limits row supplies them. A null cap or window is uncapped. A key of another organization answers 404, indistinguishable from a missing one.

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

パスパラメータ

  • api_key_idstring必須

    The key's id (the id field from GET /api/keys), not its secret.

レスポンス

  • 200

    The key's effective limits.

    レスポンス
    • api_key_idstring必須
    • daily_spend_cap_nano_usdinteger | null必須

      Spend cap in integer nano-USD (1 USD = 1,000,000,000) over spend_cap_period (the name predates the periods). Null is uncapped.

    • spend_cap_periodenum必須

      The UTC window the spend cap counts over. Daily when no explicit row exists.

      "daily""weekly""monthly""yearly"
    • requests_per_minuteinteger | null必須
    • tokens_per_minuteinteger | null必須
    • tokens_per_hourinteger | null必須
    • tokens_per_dayinteger | null必須
    • tierstring必須

      The organization's resolved rate-limit tier key (for example tier_2).

    • sourceenum必須

      explicit: a per-key limits row supplies the windows. tier: they come from the organization's tier.

      "explicit""tier"
  • 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

    The resource does not exist or belongs to another 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).

リクエスト

curl https://api.experientiallabs.ai/api/gateway/keys/6d1f8a2b-4c3e-4f5a-9b7c-2e8d0a1f3b4c/limits \
  -H "Authorization: Bearer YOUR_API_KEY"

レスポンス

{
  "api_key_id": "6d1f8a2b-4c3e-4f5a-9b7c-2e8d0a1f3b4c",
  "daily_spend_cap_nano_usd": 25000000000,
  "spend_cap_period": "daily",
  "requests_per_minute": 120,
  "tokens_per_minute": 400000,
  "tokens_per_hour": null,
  "tokens_per_day": null,
  "tier": "tier_2",
  "source": "explicit"
}

https://api.experientiallabs.ai/api/gateway/keys/6d1f8a2b-4c3e-4f5a-9b7c-2e8d0a1f3b4c/limits