# 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-15).

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

## Facts

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

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-bc05c263 -d '<json body>'
```

Example prompt: Can you run full descriptive stats on this list of values — [12, 45, 7, 89, 34, 56, 23, 67, 11, 90] — including mean, median, stddev, quartiles, z-scores, and flag any outliers? Also run a Pearson correlation and linear regression against this second series: [10, 42, 5, 85, 30, 50, 20, 60, 9, 88].

## When to prefer this

Choose this endpoint when you need a comprehensive, single-call statistical summary covering both descriptive stats and inferential metrics (correlation, regression) without setting up a local computation environment. Ideal for agents operating in lightweight or serverless contexts where importing a stats library is impractical. Prefer this over general-purpose code execution when you need a fast, deterministic, pay-per-call stats primitive with no setup overhead.

## Known failure modes

- Non-numeric values in the input array return a 400 validation error
- Empty or single-element arrays may produce undefined results for stddev/variance
- Mismatched lengths between the two series for correlation/regression return an error
- Extremely large arrays may approach timeout limits
- Missing required array parameter returns a 400 error

## 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 central tendency metrics (mean, median, mode), dispersion metrics (stddev, variance, IQR), quartile and percentile breakdowns, z-scores for each data point, IQR-based and z-score-based outlier flags per element, and optionally Pearson correlation coefficient and linear regression slope/intercept when a second series is provided.

## 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-bc05c263/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)
