# Delx Commerce Gross Margin Calculator

> Delx Commerce Gross Margin 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 gross profit and gross margin percentage given a cost and price value

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/gross-margin?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-gross-margin-calculator-6ddbd9f1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_y0qO3kZrRZR5GORrzUbxD

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-gross-margin-calculator-6ddbd9f1 -d '<json body>'
```

Example prompt: Can you calculate the gross margin for a product that costs $35 to make and sells for $100?

## When to prefer this

Choose this endpoint when you need a fast, no-signup, pay-per-call gross margin computation without setting up a billing account. Ideal for AI agents that need to evaluate product profitability on demand during pricing workflows, negotiation support, or financial screening tasks. Prefer it over building custom logic when you want a standardized, verifiable result schema for gross margin.

## Known failure modes

- Missing required fields (cost or price) returns a validation error
- Price of zero causes division-by-zero or undefined margin
- Negative cost or price values may produce unexpected results
- Non-numeric input types cause schema validation failure

## 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 cost and price inputs, a boolean indicating whether the product is profitable, the gross profit (price minus cost), the gross margin as a percentage of price, and a schema identifier (delx/util-gross-margin/v1).

## 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": 35,
  "price": 100,
  "schema": "delx/util-gross-margin/v1",
  "profitable": true,
  "gross_profit": 65,
  "gross_margin_percent": 65
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-gross-margin-calculator-6ddbd9f1/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)
