POST/api/orgs/{org_id}/trace-tags/projection

Project a check's monthly AI checks

Before you save an AI check, how many AI checks it would make in a month at your current traffic (the last 7 days, scaled to 30), against your plan's included checks and what is left this month, and a sample rate that fits when it does not. Counts come from hourly rollups. Rule checks are free and need no projection. Org admins and the organization's own key call it.

Authentication: Bearer API key in the Authorization header

Path parameters

  • org_idstringrequired

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

Request body

  • scopeenumrequired
    "llm_call""tool_call""session"
  • filtersobject

    The same filters a check takes, sample_rate included.

    filters
    • api_key_idsarray<string>
    • modelsarray<string>
    • request_tagsarray<string>
    • sample_ratenumber
      Default: 1

Responses

  • 200

    The projection.

    Response
    • window_daysinteger

      The recent traffic the projection reads, scaled to a 30-day month.

    • judgments_in_windowinteger

      Matching requests (or sessions, for a session check) in the window.

    • lower_boundboolean

      The count stopped at a cap, so the projection is at least this.

    • projected_per_month_at_full_rateinteger
    • projected_per_monthinteger

      At the check's sample rate.

    • sample_ratenumber
    • plan_billingboolean
    • included_per_monthinteger | null
    • used_this_monthinteger
    • remaining_this_monthinteger | null

      Included checks left this month. null without an allowance.

    • suggested_sample_ratenumber | null

      A sample rate whose projection fits the included checks left. null when it already fits.

  • 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 valid but may not perform this action (for example an inference key on a provisioning-key route, or a feature outside your plan).

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

  • 422

    The body or query failed validation.

    Response
    • detailarray<object>required
      detail
      • typestring
      • locarray<string | integer>
      • msgstring
  • 503

    This deployment has no score store (tags_unavailable).

    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/trace-tags/projection' \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "scope": "llm_call",
  "filters": {
    "models": [
      "gpt-6-luna"
    ],
    "sample_rate": 1
  }
}'

Response

{
  "window_days": 7,
  "judgments_in_window": 9334,
  "lower_bound": false,
  "projected_per_month_at_full_rate": 40003,
  "projected_per_month": 40003,
  "sample_rate": 1,
  "plan_billing": true,
  "included_per_month": 6500,
  "used_this_month": 2400,
  "remaining_this_month": 4100,
  "suggested_sample_rate": 0.1
}

https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/trace-tags/projection