# Percentile for Agents

> Percentile for Agents is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-13).

Computes a requested percentile (e.g. p50, p95) of a numeric array without requiring a statistics stack

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/percentile
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/percentile-for-agents-271a1b98
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rq_SFSHqq1TeRB31pzv1Q

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 percentile-for-agents-271a1b98 -d '<json body>'
```

Example prompt: What is the p95 of these response times: [120, 200, 340, 95, 410, 280, 175, 505, 230, 310]? Give me the 95th percentile value.

## When to prefer this

Choose this endpoint when you need a quick, stateless percentile calculation (p50, p95, p99, etc.) from a numeric array inside an agent workflow and you don't want to set up or depend on a statistics library or data pipeline. Ideal for summarizing latency, score distributions, or sensor readings on the fly. At $0.001 USDC per call with no API key or subscription, it's well-suited for lightweight, infrequent agent-side stat operations.

## Known failure modes

- Empty or missing 'values' array returns a structured validation error (not billed)
- Array exceeding 10,000 items is rejected
- Percentile value outside 0–100 range returns a validation error
- Non-numeric values in the array cause a validation error
- Payment failure (insufficient USDC balance or x402 misconfiguration) blocks the call

## How this service works

Percentile of a list. Use for p50/p95 style summaries without a stats stack. Returns the requested percentile of a numeric array. $0.001 USDC per successful call via x402 on Base—deterministic first-party JSON, no API key, no subscription, and nothing is billed on structured validation errors.

## Output

A JSON object containing the computed percentile value for the submitted numeric array at the requested percentile rank (0–100). The result is a deterministic first-party calculation with no external dependencies.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "values": {
   "type": "array",
   "items": {
    "type": "number"
   },
   "maxItems": 10000,
   "minItems": 1,
   "description": "Numeric samples for stats tools (mean/median/stdev/percentile). Cap 10k numbers."
  },
  "percentile": {
   "type": "number",
   "maximum": 100,
   "minimum": 0,
   "description": "Optional percentile in 0–100 (e.g. 95 for p95). Handler default when omitted."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "p": 50,
  "count": 5,
  "value": 6,
  "schema": "delx/percentile/v1"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/percentile-for-agents-271a1b98/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
