# Delx Commerce Ratio API

> Delx Commerce Ratio API 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-01).

Computes the ratio of two integers (a divided by b) and returns the decimal result

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/ratio?utm_source=zero.xyz
- Price: $0.001/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-ratio-api-891d1ad1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2hxEQYIma6V8YdbzhHFvY

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-ratio-api-891d1ad1 -d '<json body>'
```

Example prompt: What is the ratio of 3 to 12? Use the Delx ratio API to compute it.

## When to prefer this

Use this endpoint when an agent needs a lightweight, pay-per-use ratio or division computation with no signup, verifiable delivery, and micropayment billing via USDC on Base or Solana. Ideal for agents that need simple arithmetic as a composable primitive without standing up their own math service.

## Known failure modes

- Division by zero if b=0 (likely returns an error or undefined ratio)
- Non-integer inputs rejected by schema validation
- Missing required fields a or b returns a 400-style error
- Payment failure via x402 if USDC balance is insufficient

## How this service works

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

## Output

A JSON object containing the original inputs (a, b), the computed ratio as a decimal float (a/b), and a schema identifier string (delx/util-ratio/v1).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "a": {
   "type": "integer",
   "description": "Input field: a."
  },
  "b": {
   "type": "integer",
   "description": "Input field: b."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "a": 2,
  "b": 4,
  "ratio": 0.5,
  "schema": "delx/util-ratio/v1"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-ratio-api-891d1ad1/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)
