# Delx Log-Loss Calculator

> Delx Log-Loss Calculator 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-15).

Computes the log-loss (cross-entropy loss) for a single binary prediction given a predicted probability and an actual binary outcome.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/log-loss
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-log-loss-calculator-25ae67a7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YzHzPyWKg0wi-_vGa_dhX

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-log-loss-calculator-25ae67a7 -d '<json body>'
```

Example prompt: What's the log-loss when my model predicted a probability of 0.7 and the actual outcome was 1?

## When to prefer this

Use this endpoint when you need a quick, stateless, per-prediction log-loss calculation without spinning up a local ML library or runtime. Ideal for agent workflows that evaluate individual classifier outputs on-the-fly, audit model confidence scores, or spot-check calibration during inference pipelines. Prefer this over batch evaluation tools when you only need a single data point scored.

## Known failure modes

- Invalid probability value (outside 0–1 range) may cause computation errors or undefined results
- Non-integer outcome value may cause schema validation failure
- Missing required fields (prob or outcome) will return an error
- Probability of exactly 0 or 1 paired with the opposite outcome produces infinite log-loss

## How this service works

Log loss (cross-entropy) for a probability vs binary outcome. Call when training-style forecast quality when sharp mistakes matter. Returns log loss value 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 input probability, the input outcome, the schema identifier ('delx/util-log-loss/v1'), and the computed log-loss value as a floating-point number (e.g. 0.3566749439387324).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "prob": {
   "type": "number",
   "description": "Input field: prob."
  },
  "outcome": {
   "type": "integer",
   "description": "Input field: outcome."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "prob": 0.7,
  "schema": "delx/util-log-loss/v1",
  "outcome": 1,
  "log_loss": 0.3566749439387324
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-log-loss-calculator-25ae67a7/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)
