# Delx Commerce Set Difference API

> Delx Commerce Set Difference 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 set difference (elements in array A that are not in array B) and returns the unique items and count

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/set-diff?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-set-difference-api-a0958889
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nywJUFUmHUshonenQs6h_

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-set-difference-api-a0958889 -d '<json body>'
```

Example prompt: Can you find all the items that are in my first list [1, 2, 3, 4, 5] but not in my second list [2, 4] — just give me the difference?

## When to prefer this

Choose this endpoint when you need a fast, cheap ($0.001 USDC), pay-per-use set difference computation with no signup or account required. Ideal for AI agents that need to compute array differences programmatically as part of a workflow without spinning up custom code or using heavier data processing services. Best when you want verifiable, on-chain payment and guaranteed delivery via the x402 protocol.

## Known failure modes

- Invalid or missing array inputs returns an error
- Non-array types passed as inputs may cause a 400 error
- Payment failure via x402 protocol results in a 402 response with payment details
- Empty array A returns count 0 and empty items array
- Large arrays may time out depending on server limits

## 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 count of differing elements, an array of items present in array A but not in array B, and a schema identifier string ('delx/util-set-diff/v1') for verifying the response format.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 2,
  "items": [
   1,
   3
  ],
  "schema": "delx/util-set-diff/v1"
 }
}
```

## More

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