# Delx Commerce Log-Loss Calculator

> Delx Commerce Log-Loss Calculator is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-02).

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

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/log-loss?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-log-loss-calculator-a6b71b56
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zOVYj42G_nOV1DgFoViMv

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

Example prompt: Calculate the log-loss for a prediction where my model said the probability was 0.7 and the actual outcome was 1.

## When to prefer this

Choose this endpoint when you need a fast, pay-per-call log-loss computation for individual binary classification predictions without setting up your own math library or model evaluation infrastructure. It is ideal for agent pipelines that need to score or audit predictions one at a time with verifiable, micropayment-based access and no API key management.

## Known failure modes

- Probability value outside [0,1] range may cause computation error or unexpected result
- Missing required fields (prob or outcome) will result in a validation error
- Outcome value not 0 or 1 (non-binary) may produce incorrect or undefined results
- Network or payment failure via x402 protocol prevents the call from completing

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

Returns a JSON object containing the original probability, the actual outcome, the schema identifier ('delx/util-log-loss/v1'), and the computed log-loss value as a float (e.g. 0.3567 for prob=0.7, outcome=1).

## 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-commerce-log-loss-calculator-a6b71b56/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
