# Latency Budget Analyzer

> Latency Budget Analyzer is a paid API for AI agents from data-calc.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-30).

Breaks down serial stage latencies against a total target, computes per-stage share and slack, identifies the bottleneck, and quantifies tail amplification from fan-out parallelism.

## Facts

- Endpoint: GET https://data-calc.x402tookit.com/latency-budget?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/latency-budget-analyzer-691d0ef6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7UC_xPDk89wKARfZ2ip4G

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability latency-budget-analyzer-691d0ef6
```

Example prompt: Break down my request pipeline latency budget — stages are dns:20, tls:40, app:120, db:60 — against a 300ms target at p99, and tell me which stage is the bottleneck and how much slack I have left.

## When to prefer this

Use this endpoint when you need to mathematically decompose a latency budget across named serial pipeline stages, compute slack against an SLA target, identify the bottleneck, or quantify tail amplification risk from fan-out parallelism. Prefer it over manual calculation or general-purpose math tools when the input is a comma-separated list of named stage latencies and you want structured output with per-stage shares, verdicts, and fan-out statistics in a single call.

## Known failure modes

- Missing required 'stages' query parameter returns an error
- Malformed stages string (not name:ms,name:ms format) causes a parse error
- percentile outside 50–99.9999 range is rejected
- fanOut value outside 1–100000 range is rejected
- targetMs omitted means slack fields will be null in the response

## How this service works

Add up serial stage latencies against a target (share per stage, slack, bottleneck) and compute tail amplification from fan-out.

## Output

Returns a structured breakdown of each named pipeline stage with its latency in milliseconds and share of the serial total, the serial total, slack against the target, the bottleneck stage name, a pass/fail verdict, and optionally fan-out statistics including the probability at least one parallel call exceeds its percentile and the per-call percentile needed to match an equivalent overall SLA.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "stages"
     ],
     "properties": {
      "fanOut": {
       "type": "integer",
       "description": "Parallel calls a request waits for (each at its own percentile), 1 to 100000"
      },
      "stages": {
       "type": "string",
       "description": "name:milliseconds pairs, comma separated: dns:20,tls:40,app:120,db:60"
      },
      "targetMs": {
       "type": "number",
       "description": "Total latency target in milliseconds, to compute slack"
      },
      "percentile": {
       "type": "number",
       "description": "Per-call percentile, 50 to 99.9999 (default 99): the chance a single call is within its stated latency"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "fanOut": {
       "type": [
        "null",
        "object"
       ],
       "properties": {
        "note": {
         "type": [
          "null",
          "string"
         ]
        },
        "calls": {
         "type": [
          "null",
          "number"
         ]
        },
        "perCallPercentile": {
         "type": [
          "null",
          "number"
         ]
        },
        "requestsHitByTailPercent": {
         "type": [
          "null",
          "number"
         ]
        },
        "perCallPercentileNeededForSameOverall": {
         "type": [
          "null",
          "number"
         ]
        },
        "probabilityAtLeastOneCallSlowerThanItsPercentile": {
         "type": [
          "null",
          "number"
         ]
        }
       }
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "stages": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "object",
        "properties": {
         "ms": {
          "type": [
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/latency-budget-analyzer-691d0ef6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from data-calc.x402tookit.com](https://www.zero.xyz/host/data-calc.x402tookit.com/llms.txt)
