# Duo Data Utilities – Descriptive Statistics

> Duo Data Utilities – Descriptive Statistics is a paid API for AI agents from api.duoleads.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-10-02).

Computes comprehensive descriptive statistics (count, mean, median, mode, variance, stdev, quartiles, skewness, kurtosis, percentiles, and more) for a supplied numeric array in a single call.

## Facts

- Endpoint: GET https://api.duoleads.com/v1/num/stats?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/duo-data-utilities-descriptive-statistics-64f18492
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5FBTO2DXBBPnIvveoQUt_

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 duo-data-utilities-descriptive-statistics-64f18492
```

Example prompt: Can you give me a full statistical summary for these numbers: 4, 7, 13, 2, 19, 8, 5, 11 — including mean, median, standard deviation, quartiles, skewness, and kurtosis, using linear interpolation for percentiles?

## When to prefer this

Choose this endpoint when you need a comprehensive, reproducible statistical summary of a numeric dataset in a single API call, especially when you need both sample and population variance/stdev, multiple named percentiles with a specified interpolation method, or distributional shape metrics like skewness and kurtosis — without building your own stats library or running a Python/R environment.

## Known failure modes

- Missing or empty 'values' parameter returns a validation error
- Non-numeric or non-finite values in the array cause a parse/validation error
- More than 500 values provided exceeds the array size limit
- More than 20 percentiles requested exceeds the percentile limit
- Invalid 'method' enum value returns a validation error
- Invalid 'ddof' value (non-integer) causes a parameter error
- Payment of 0.05 USDC not fulfilled results in HTTP 402

## How this service works

Descriptive statistics for a supplied numeric array in one call: count, sum, mean, median, mode, variance and standard deviation with variance and standard deviation honouring ddof (default 1, the sample form; 0 gives the population form) and always-population *_population fields, min, max, range, the quartiles and interquartile range, skewness, kurtosis, and any requested percentiles. Percentiles use a named interpolation method so the result is reproducible rather than implementation-defined.

## Output

A JSON object containing: n (count), sum, mean, median, mode, variance (sample and population), standard deviation (sample and population), min, max, range, q1, q3, iqr, skewness, excess kurtosis, percentiles keyed by requested values, Tukey outliers list, plus metadata including request_id, computed_at timestamp, price, and a deterministic flag.

## 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": [
      "values"
     ],
     "properties": {
      "ddof": {
       "type": "string",
       "default": "1",
       "pattern": "^[+-]?\\d+$",
       "maxLength": 64,
       "description": "Delta degrees of freedom for variance/stdev: 1 (default, sample, n-1) or 0 (population, n). The *_population fields are always population."
      },
      "method": {
       "enum": [
        "linear",
        "nearest",
        "lower",
        "higher",
        "midpoint"
       ],
       "type": "string",
       "default": "linear",
       "maxLength": 64,
       "description": "Percentile interpolation (NumPy/R names): linear (default), nearest, lower, higher, midpoint."
      },
      "values": {
       "type": "string",
       "maxLength": 4096,
       "description": "Comma-separated finite numbers, at most 500 values."
      },
      "percentiles": {
       "type": "string",
       "default": "25,50,75",
       "maxLength": 256,
       "description": "Comma-separated percentiles 0-100, at most 20. Default 25,50,75."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "ok",
      "route",
      "version",
      "data",
      "meta"
     ],
     "properties": {
      "ok": {
       "const": true
      },
      "data": {
       "type": "object",
       "required": [
        "n",
        "sum",
        "mean",
        "median",
        "mode",
        "ddof",
        "variance",
        "stdev",
        "variance_population",
        "stdev_population",
        "min",
        "max",
        "range",
        "q1",
        "q3",
        "iqr",
        "skewness",
        "kurtosis_excess",
        "percentiles",
        "method",
        "outliers_tukey"
       ],
       "properties": {
        "n": {
         "type": "integer"
        },
        "q1": {
         "type": [
          "number",
          "null"
         ]
        },
       
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "data": {
   "n": 5,
   "q1": 2,
   "q3": 4,
   "iqr": 2,
   "max": 5,
   "min": 1,
   "sum": 15,
   "ddof": 1,
   "mean": 3,
   "mode": null,
   "range": 4,
   "stdev": 1.58113883008419,
   "median": 3,
   "method": "linear",
   "skewness": 0,
   "variance": 2.5,
   "percentiles": {
    "25": 2,
    "50": 3,
    "75": 4
   },
   "outliers_tukey": [],
   "kurtosis_excess": -1.199999999999999,
   "stdev_population": 1.414213562373095,
   "variance_population": 2
  },
  "meta": {
   "price_usd": "0.05",
   "disclaimer": "Factual output of a deterministic computation over public data. Provided as is, with no warranty of accuracy, completeness or availability. Not investment, financial, legal, tax, medical or any other professional advice, and not a recommendation. Verify before relying on it. Terms: https://api.duoleads.com/terms",
   "request_id": "01K6B7Q4ZC8H3F2M9WXR5TYN0D",
   "computed_at": "2026-09-28T12:00:00.000Z",
   "deterministic": true
  },
  "route": "/v1/num/stats",
  "version": "1.0.0"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/duo-data-utilities-descriptive-statistics-64f18492/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.duoleads.com](https://www.zero.xyz/host/api.duoleads.com/llms.txt)
