# JSON Object Diff

> JSON Object Diff 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-13).

Compares two JSON objects and reports added, removed, and changed top-level keys with counts and normalized values

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/json-object-diff
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-object-diff-d1c8797e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_v4hWsqdkRQoc_iSlpW8pE

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-object-diff-d1c8797e -d '<json body>'
```

Example prompt: Compare these two JSON objects for me and tell me exactly which top-level keys were added, removed, or changed — before: {"name":"Alice","age":30,"role":"user"} and after: {"name":"Alice","age":31,"role":"admin","verified":true}.

## When to prefer this

Choose this endpoint when you need a lightweight, deterministic, in-memory diff of two JSON objects' top-level keys without persisting data — especially as a preflight step before handing structured data to a downstream tool with a strict contract. Prefer it over general-purpose diffing logic when you need a versioned, normalized result contract for auditability in an agentic pipeline.

## Known failure modes

- Either 'before' or 'after' object exceeds 128-property limit — request rejected
- Malformed or non-object input for before/after fields — validation error
- Payment failure via x402 — request not processed
- Network timeout or service unavailability — no result returned

## How this service works

JSON Object Diff: JSON Object Diff reports added, removed, and changed top-level object keys from bounded caller-supplied values without an external provider. Call JSON Object Diff 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 Object Diff as versioned deterministic JSON. Price: $0.001 USDC via x402 on Base. First…

## Output

Returns a versioned deterministic JSON result containing lists of added, removed, and changed top-level keys, along with counts of each change type, normalized values for the diffed fields, and a versioned result contract.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "after": {
   "type": "object",
   "description": "After supplied to JSON Object Diff; used only for this bounded calculation and processed in memory without retention.",
   "maxProperties": 128,
   "additionalProperties": true
  },
  "before": {
   "type": "object",
   "description": "Before supplied to JSON Object Diff; used only for this bounded calculation and processed in memory without retention.",
   "maxProperties": 128,
   "additionalProperties": true
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "added": {
    "c": 3
   },
   "changed": {
    "a": {
     "after": 2,
     "before": 1
    }
   },
   "removed": {
    "b": 2
   }
  },
  "schema": "delx/util-json-object-diff/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "164aa307def42287450ca3e3593d1a42c71383be4ad4b1f0c368f8c66f056f3e",
   "external_calls": 0
  },
  "operation": "data_batch:json_object_diff"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-object-diff-d1c8797e/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)
