# Delx Commerce — Numeric Comparison (cmp-num)

> Delx Commerce — Numeric Comparison (cmp-num) 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).

Compares two integers and returns a comparison result indicating their relative order (-1, 0, or 1).

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/cmp-num?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-numeric-comparison-cmp-num-8bb377b6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YEF9J5QWvpQF-S7S_l9a0

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-numeric-comparison-cmp-num-8bb377b6 -d '<json body>'
```

Example prompt: Compare the numbers 2 and 5 for me — tell me whether the first is less than, equal to, or greater than the second.

## When to prefer this

Choose this endpoint when you need a simple, verifiable, pay-per-call numeric comparison with no signup friction, especially in agentic pipelines that already use x402/USDC micropayments on Base or Solana. It is ideal for lightweight sorting, ranking, or threshold logic steps within automated workflows where a minimal, standardized output format is required.

## Known failure modes

- Missing or non-integer inputs may return a validation error
- Payment failure via x402 protocol results in a 402 Payment Required response with no result
- Network or service unavailability returns a 5xx error
- Malformed request body (e.g. floats instead of integers) may cause unexpected behavior or rejection

## 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 inputs (a and b), a comparison value (cmp) of -1 if a < b, 0 if a == b, or 1 if a > b, and a schema identifier string ('delx/util-cmp-num/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": 5,
  "cmp": -1,
  "schema": "delx/util-cmp-num/v1"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-numeric-comparison-cmp-num-8bb377b6/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)
