# Delx Calibration ECE

> Delx Calibration ECE 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-14).

Computes Expected Calibration Error (ECE) from forecast probabilities and binary outcomes to measure probabilistic model calibration quality.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/calibration-ece
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-calibration-ece-c4b8d2bf
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DsMfivrtv0IKWM8Hu0TRg

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 delx-calibration-ece-c4b8d2bf -d '<json body>'
```

Example prompt: Calculate the expected calibration error for these 5 forecasts [0.1, 0.4, 0.6, 0.8, 0.9] against outcomes [0, 0, 1, 1, 1] using 5 calibration bins.

## When to prefer this

Use this endpoint when you need a fast, pay-per-call ECE computation without standing up your own calibration library, especially within agent workflows that already use the Delx utility ecosystem. Prefer it over implementing ECE manually when you need a stateless, versioned, auditable calibration measurement that integrates cleanly into automated pipelines.

## Known failure modes

- Mismatched array lengths between forecasts and outcomes returns a validation error
- Forecast probabilities outside [0,1] range cause schema rejection
- Zero bins or negative bin count results in a bad request error
- Empty forecast/outcome arrays may return ECE of 0 or an error
- Non-binary values in outcomes array (anything other than 0 or 1) may cause incorrect results or errors

## How this service works

Expected calibration error from forecast/outcome pairs. Call when scoring probability model calibration offline. Returns ece and n as deterministic JSON for $0.001 USDC via x402 on Base. First-party local math only—no RPC, live market feed, API keys, storage, or mediagen. Advisory only; the caller owns capital, risk, and production controls.

## Output

Returns a JSON object containing the ECE score (a float indicating mean calibration error across bins), the total number of samples evaluated (n), and a schema identifier string (e.g. 'delx/util-calibration-ece/v1') for versioning and provenance tracking.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "bins": {
   "type": "integer",
   "description": "Number of calibration bins"
  },
  "outcomes": {
   "type": "array",
   "description": "Binary outcomes 0/1 aligned with forecasts"
  },
  "forecasts": {
   "type": "array",
   "description": "Forecast probabilities in [0,1]"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "n": 4,
  "ece": 0.225,
  "schema": "delx/util-calibration-ece/v1"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-calibration-ece-c4b8d2bf/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)
