POST/api/orgs/{org_id}/trace-tags/{tag_id}/backfill/estimate

Price a backfill

AI checks only: counts the stored calls in a window (at most 90 days), applies the sample rate, and prices each as an 8 KB judge call. The estimate_token fixes the price for 15 minutes. A Rule check has no backfill (422 backfill_not_available).

Authentication: Bearer API key in the Authorization header

Path parameters

  • org_idstringrequired

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

  • tag_idstringrequired

    The trace tag id.

Request body

  • fromstringrequired
  • tostringrequired
  • max_spansintegerrequired

    1 to 100,000.

Responses

  • 200

    The estimate.

  • 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

    No tag with this id (tag_not_found).

    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 window is longer than 90 days or invalid.

    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/0c6f2e4a-7b1d-4f3e-9a2c-5d8e1b7f3a90/backfill/estimate' \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "from": "2026-11-01T00:00:00Z",
  "to": "2026-11-18T00:00:00Z",
  "max_spans": 20000
}'

Response

{
  "spans": 18200,
  "estimated_nano_usd": 2184000000,
  "estimate_token": "c1b2a3d4",
  "expires_at": "2026-11-18T14:47:07Z"
}

https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/trace-tags/0c6f2e4a-7b1d-4f3e-9a2c-5d8e1b7f3a90/backfill/estimate