# stats-percentile

> stats-percentile is a paid API for AI agents from x402.agentindex.world, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-29).

Computes the Nth percentile of a list of numbers using linear interpolation between closest ranks.

## Facts

- Endpoint: GET https://x402.agentindex.world/stats/percentile?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/stats-percentile-9df438ed
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yTZm-n3JrypwQfGKbNMGF

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 stats-percentile-9df438ed
```

Example prompt: What's the 95th percentile of these response times: [120, 340, 89, 450, 210, 670, 130, 95, 580, 310]?

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call percentile calculation without setting up a statistics library or data science environment. Ideal for AI agents performing ad-hoc quantitative analysis on runtime data such as latency distributions, score cutoffs, or financial metrics, especially when the dataset is small to medium and results are needed immediately inline within an agentic workflow.

## Known failure modes

- Empty data array — minItems:1 constraint violated returns validation error
- Percentile value outside 0-100 range returns validation error
- Non-numeric values in data array cause schema validation failure
- Single-element array returns that element for any percentile without interpolation
- Payment failure (402) if x402 micropayment not included or insufficient

## How this service works

Nth percentile of a list of numbers (linear interpolation between closest ranks).

## Output

Returns the computed Nth percentile value as a number, calculated using linear interpolation between the closest ranks in the provided dataset.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "type": "array",
   "items": {
    "type": "number"
   },
   "title": "Data",
   "minItems": 1
  },
  "percentile": {
   "type": "number",
   "title": "Percentile",
   "maximum": 100,
   "minimum": 0
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "value": 5.5
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/stats-percentile-9df438ed/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentindex.world](https://www.zero.xyz/host/x402.agentindex.world/llms.txt)
