# JSON Diff

> JSON Diff is a paid API for AI agents from 2s.io, paid per call via x402, $0.0025/call, status unknown (last checked 2026-09-14).

Computes a structured diff between two JSON values, showing what changed between them

## Facts

- Endpoint: POST https://2s.io/api/dev/diff-json
- Price: $0.0025/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-diff-b92ac07f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Rd14cu1JQxYlFVZAMYji3

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

Example prompt: Can you diff these two JSON objects for me and tell me exactly what changed — here's the original: {"name":"Alice","age":30,"role":"admin"} and here's the updated version: {"name":"Alice","age":31,"role":"user","email":"alice@example.com"}?

## When to prefer this

Use this endpoint when you need a machine-readable, structured diff between two arbitrary JSON values — especially useful for comparing API responses across time, auditing configuration changes, or detecting state mutations. Prefer this over string-based diff tools when the inputs are JSON and you want semantically meaningful field-level comparison rather than line-by-line text diffs.

## Known failure modes

- Invalid or malformed JSON in either 'a' or 'b' field returns an error
- Missing required fields returns a validation error
- Very deeply nested or extremely large JSON objects may time out or return partial results

## How this service works

The (most) everything API: 575+ pay-per-call endpoints for AI agents — ground-truth data, a full AI gateway, and agent infrastructure (storage, queues, watchers). USDC via x402, no signup, no API keys, and upto billing: pay actual usage, not the quote.

## Output

A structured diff result showing which fields were added, removed, or modified between the two input JSON values, enabling precise change detection without manual comparison.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "a": {},
  "b": {}
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-diff-b92ac07f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
