# Delx Commerce — Cost-Per-Success Calculator

> Delx Commerce — Cost-Per-Success Calculator is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-01).

Calculates the cost per successful delivery given a total cost and a count of successful outcomes over a time window.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/cost-per-success?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-cost-per-success-calculator-c0014740
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wCpD4hBWHHCLo_NpH5rl9

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-cost-per-success-calculator-c0014740 -d '<json body>'
```

Example prompt: I ran 50 successful deliveries this window and spent $12.50 total — can you calculate my cost per success?

## When to prefer this

Use this endpoint when you need a quick, on-demand computation of cost-per-success unit economics without building your own division logic, especially within a pay-per-result agent workflow on Delx Commerce that already uses USDC micropayments via x402. It is ideal for lightweight, real-time cost reporting inside agentic loops where you want a schema-versioned, verifiable response rather than doing the arithmetic inline.

## Known failure modes

- Missing or zero success_count causes division-by-zero or validation error
- Non-numeric values for total_cost or success_count cause a 400 bad request
- Negative values for either field may produce unexpected or invalid results
- Payment not provided or insufficient USDC triggers an x402 payment-required response

## 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 schema identifier ('delx/util-cost-per-success/v1'), the original total_cost, the original success_count, and the computed cost_per_success as a decimal number (e.g. 0.25 for $0.25 per success).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "total_cost": {
   "type": "number",
   "description": "Total cost incurred in the window."
  },
  "success_count": {
   "type": "number",
   "description": "Number of successful deliveries."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "schema": "delx/util-cost-per-success/v1",
  "total_cost": 12.5,
  "success_count": 50,
  "cost_per_success": 0.25
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-cost-per-success-calculator-c0014740/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)
