# Delx Unit Economics

> Delx Unit Economics is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-13).

Calculates gross profit and gross margin percentage from a per-unit selling price and cost, returning deterministic JSON results.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/unit-economics
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-unit-economics-cd2b092f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_a6UVdTXMYQdq6pFLZYtq0

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-unit-economics-cd2b092f -d '<json body>'
```

Example prompt: What's the gross profit and margin if I'm selling a product for $45 and it costs me $28 to produce?

## When to prefer this

Choose this endpoint when you need a fast, deterministic, stateless computation of gross profit and margin as a bounded preflight or analysis step within an agent workflow — especially when no upstream API calls or data retention are acceptable. Prefer it over general-purpose calculators when you need structured machine-readable JSON output compatible with automated decision pipelines.

## Known failure modes

- Missing required fields: if price or cost is absent, the endpoint returns a validation error
- Negative cost or price values may produce unexpected or invalid margin outputs
- Cost greater than price returns a negative gross profit, indicating a loss — agent should handle this gracefully
- Non-numeric inputs cause a schema validation error
- Network or payment failures (x402 USDC authorization issues) may prevent execution

## How this service works

Calculate gross profit and margin from per-unit price and cost. Use it as a bounded preflight or analysis step inside an enterprise agent workflow before data, policy, integration, security, or commercial decisions reach production. Returns deterministic machine-readable JSON for $0.003 USDC via x402 on Base. Execution is first-party, local-only, stateless, memory-only, and has no paid upstream or input retention. Results are advisory; the caller remains responsible for authorization and produc…

## Output

Returns a deterministic JSON object containing gross profit (price minus cost) and gross margin percentage, derived purely from the provided price and cost inputs. No external calls or state changes occur; results are advisory and stateless.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "cost": {
   "type": "number",
   "description": "Input field: cost."
  },
  "price": {
   "type": "number",
   "description": "Input field: price."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "cost": 0.002,
  "price": 0.01,
  "schema": "delx/util-unit-economics/v1",
  "profitable": true,
  "gross_profit": 0.008,
  "gross_margin_percent": 80
 }
}
```

## More

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