# 24K Labs Stats Toolkit

> 24K Labs Stats Toolkit is a paid API for AI agents from api.24klabs.ai, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-13).

Computes descriptive statistics (mean/median/mode, stddev/variance, quartiles/percentiles, z-scores, IQR), flags outliers, and optionally computes Pearson correlation and linear regression against a second data series.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/stats-toolkit
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/24k-labs-stats-toolkit-7fb9cd42
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Ik-5SukQftLT24-iE_m_v

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 24k-labs-stats-toolkit-7fb9cd42 -d '<json body>'
```

Example prompt: Give me a full statistical summary of this dataset — [12, 15, 14, 10, 100, 13, 11, 14, 15, 12] — including mean, median, mode, standard deviation, quartiles, z-scores, and flag any outliers using both IQR and z-score methods. Also run a Pearson correlation and linear regression against a second series [1,2,3,4,5,6,7,8,9,10].

## When to prefer this

Choose this endpoint when you need a comprehensive, single-call statistical summary of a numeric dataset rather than computing individual statistics separately. It is ideal for data quality checks, exploratory data analysis, outlier detection pipelines, or whenever you need correlation and regression alongside descriptive stats without stitching together multiple tools. Prefer it over general-purpose LLM math when you need precise, reproducible numerical results.

## Known failure modes

- Empty or non-numeric array returns validation error
- Single-element array may produce undefined stddev or mode
- Non-numeric values in array cause parse/type error
- Second series of mismatched length causes regression/correlation error
- Extremely large arrays may hit payload size limits
- Missing required data field returns 400 bad request

## How this service works

One call for mean/median/mode, stddev/variance, quartiles/percentiles, z-scores, IQR and z-score outlier flags; optional Pearson correlation and linear regression against a second series.

## Output

Returns a JSON object containing descriptive statistics (mean, median, mode, standard deviation, variance), quartiles, requested percentile values, z-scores for each data point, IQR value, outlier flags (IQR-based and/or z-score-based), and optionally Pearson correlation coefficient and linear regression slope/intercept against a second series.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "type": "array"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "mean": 5,
  "stdev": 2,
  "median": 4.5,
  "outliers": []
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/24k-labs-stats-toolkit-7fb9cd42/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.24klabs.ai](https://www.zero.xyz/host/api.24klabs.ai/llms.txt)
