distill_har_capture — Distill & Scrub HAR Network Capture

Parses Chrome DevTools / Playwright .har captures, strips static assets (.js/.css/fonts/images), analytics beacons, and OPTIONS preflights, scrubs credentials (Authorization, Cookie, Set-Cookie, X-Api-Key, token params, JWTs) into [REDACTED:<type>], groups dynamic :id/:uuid routes and polling loops, surfaces 4xx/5xx failures and slowestEndpoints, and infers compact TypeScript request/response schemas.

Why buy vs. DIY: Replaces ad-hoc jq/Python HAR scripts that miss base64 bodies, leak Bearer JWTs/cookies into LLM prompts, or fail to merge nullable JSON types across repeated API calls.

Pricing: $0.002 base (up to $0.008 max ($0.002 base + $0.001 per 250KB of .har input, capped at $0.008), x402 variable settlement) · REST: POST https://trace-diet.apikeg.com/v1/distill-har-capture · MCP: https://trace-diet.apikeg.com/mcp

Input Parameters

FieldTypeRequired / DefaultDescription & Constraints
har object Optional Parsed HAR 1.2 JSON object containing log.entries (exported from Chrome DevTools, Playwright, or mitmproxy).
harJson string Optional Raw serialized .har JSON text when passing unparsed file contents directly. (minLength: 2, maxLength: 5000000)
includeStaticAssets boolean Default: false Keep static asset requests (.js, .css, .woff2, .png, .svg, .ico, images/fonts). Defaults to false.
includeTelemetry boolean Default: false Keep analytics and telemetry beacons (Google Analytics, Segment, Datadog, Sentry, Mixpanel). Defaults to false.
includeOptionsPreflight boolean Default: false Keep CORS OPTIONS preflight requests. Defaults to false.
redactSecrets boolean Default: true Scrub Authorization, Cookie, Set-Cookie, X-Api-Key, api_key/token query params, and JWTs into [REDACTED:<type>].
inferSchemas boolean Default: true Infer compact TypeScript interfaces/types for JSON request and response payloads across endpoint calls.
maxFailureBodyChars integer Default: 512 Maximum characters retained per 4xx/5xx/network failure body snippet. (min: 64, max: 4096)
maxSlowestEndpoints integer Default: 10 Maximum number of slowest endpoints ranked by p95 latency. (min: 1, max: 50)
allowedHosts array Optional Optional hostname allowlist (e.g. ['api.acme.com']) to isolate target traffic. (maxItems: 50)

REST Example (curl)

curl -X POST "https://trace-diet.apikeg.com/v1/distill-har-capture" \
  -H "Content-Type: application/json" \
  -d '{
  "redactSecrets": true,
  "inferSchemas": true,
  "includeStaticAssets": false,
  "includeTelemetry": false,
  "includeOptionsPreflight": false,
  "maxFailureBodyChars": 512,
  "maxSlowestEndpoints": 10,
  "har": {
    "log": {
      "version": "1.2",
      "entries": [
        {
          "startedDateTime": "2026-11-30T08:15:00.000Z",
          "time": 412,
          "request": {
            "method": "POST",
            "url": "https://api.shop.io/users/94821/orders/550e8400-e29b-41d4-a716-446655440000?api_key=live_secret",
            "headers": [
              {
                "name": "Authorization",
                "value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI5NDgyMSJ9.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
              }
            ],
            "postData": {
              "mimeType": "application/json",
              "text": "{\"sku\":\"PRO-ANNUAL\",\"Seats\":5}"
            }
          },
          "response": {
            "status": 500,
            "statusText": "Internal Server Error",
            "headers": [
              {
                "name": "Content-Type",
                "value": "application/json"
              }
            ],
            "content": {
              "mimeType": "application/json",
              "text": "{\"error\":\"stripe_upstream_timeout\",\"retryable\":true}"
            }
          }
        }
      ]
    }
  }
}'

MCP tools/call Payload

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "distill_har_capture",
    "arguments": {
      "redactSecrets": true,
      "inferSchemas": true,
      "includeStaticAssets": false,
      "includeTelemetry": false,
      "includeOptionsPreflight": false,
      "maxFailureBodyChars": 512,
      "maxSlowestEndpoints": 10,
      "har": {
        "log": {
          "version": "1.2",
          "entries": [
            {
              "startedDateTime": "2026-11-30T08:15:00.000Z",
              "time": 412,
              "request": {
                "method": "POST",
                "url": "https://api.shop.io/users/94821/orders/550e8400-e29b-41d4-a716-446655440000?api_key=live_secret",
                "headers": [
                  {
                    "name": "Authorization",
                    "value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI5NDgyMSJ9.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
                  }
                ],
                "postData": {
                  "mimeType": "application/json",
                  "text": "{\"sku\":\"PRO-ANNUAL\",\"Seats\":5}"
                }
              },
              "response": {
                "status": 500,
                "statusText": "Internal Server Error",
                "headers": [
                  {
                    "name": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "content": {
                  "mimeType": "application/json",
                  "text": "{\"error\":\"stripe_upstream_timeout\",\"retryable\":true}"
                }
              }
            }
          ]
        }
      }
    }
  }
}