# JSON Array Difference

> JSON Array Difference is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Computes the set difference of two integer arrays, returning elements present in the left array but absent from the right array.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/json-array-difference
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-array-difference-3b39bac1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Y472G3bjwJvx3Z3AMru5z

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 json-array-difference-3b39bac1 -d '<json body>'
```

Example prompt: Can you find which numbers from my left array [1, 2, 3, 4, 5] are missing from my right array [2, 4, 6]?

## When to prefer this

Use this endpoint when you need a fast, deterministic, in-memory set difference computation on bounded integer arrays (up to 256 items each) without standing up your own compute or relying on a general-purpose code executor. Ideal for pre-flight checks before handing structured data to downstream tools with strict contracts, reconciliation tasks, or filtering already-processed IDs from a pending batch.

## Known failure modes

- Input arrays exceed 256 items — request rejected
- Non-integer values in arrays — schema validation failure
- Malformed JSON body — 400 bad request
- Payment not included or insufficient — 402 payment required
- Empty arrays provided — returns empty difference with zero count

## How this service works

JSON Array Difference: JSON Array Difference returns left-side values absent from the right JSON array from bounded caller-supplied values without an external provider. Call JSON Array Difference before an agent hands structured data or a batch plan to a downstream tool with a stricter contract. Returns the bounded transformation or validation finding with counts, normalized values, and a versioned result contract for JSON Array Difference as versioned deterministic JSON. Price: $0.001 USDC via…

## Output

Returns a versioned deterministic JSON object containing the array of integers present in the left input but absent from the right input, along with counts of differing elements and normalized values. The result is processed in-memory without data retention.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "left": {
   "type": "array",
   "items": {
    "type": "integer"
   },
   "maxItems": 256,
   "description": "Left supplied to JSON Array Difference; used only for this bounded calculation and processed in memory without retention."
  },
  "right": {
   "type": "array",
   "items": {
    "type": "integer"
   },
   "maxItems": 256,
   "description": "Right supplied to JSON Array Difference; used only for this bounded calculation and processed in memory without retention."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "count": 2,
   "items": [
    1,
    3
   ]
  },
  "schema": "delx/util-json-array-difference/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "dfa0bc27e93c4ecbb96000cad1ce90953df1aea4a2be0fa5caddbb32e50aa899",
   "external_calls": 0
  },
  "operation": "data_batch:json_array_difference"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-array-difference-3b39bac1/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)
