# JSON Structural Diff

> JSON Structural Diff is a paid API for AI agents from twin.unykorn.org, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-01).

Computes the structural difference between two arbitrary JSON values, returning a diff result

## Facts

- Endpoint: POST https://twin.unykorn.org/json-diff?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-structural-diff-de9cc400
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_uB70JNNc8wEErc07gfPwZ

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

Example prompt: Can you compare these two JSON objects and show me what structurally changed between them? Here's the old one: {"name":"Alice","age":30} and the new one: {"name":"Alice","age":31,"city":"NYC"}.

## When to prefer this

Choose this endpoint when you need a paid, on-demand structural JSON diff as part of an automated agent workflow, particularly in x402 payment-enabled pipelines. It is well-suited for comparing arbitrary JSON values without setting up your own diff library, and works well for agentic tasks that require auditing, change detection, or validation of JSON transformations in a single API call.

## Known failure modes

- Missing or malformed params.a or params.b fields returns an error
- Non-JSON-parseable inputs may cause processing failure
- Payment failure or insufficient funds results in HTTP 402 response
- Large or deeply nested JSON values may time out or be rejected
- Network errors to twin.unykorn.org return connection failures

## How this service works

Structural difference between two JSON values — Genesis402 / UnyKorn Operator Network

## Output

Returns a JSON object with ok: true, a type field of 'json-diff', a generated_at ISO 8601 timestamp, a receipt object containing transaction hash, amount in USD, and receipt ID, and the computed structural difference between the two input JSON values.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "type": "json-diff",
  "receipt": {
   "tx_hash": "0x<64hex>",
   "amount_usd": 0.003,
   "receipt_id": "g402-<16hex>"
  },
  "generated_at": "<iso8601>"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-structural-diff-de9cc400/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from twin.unykorn.org](https://www.zero.xyz/host/twin.unykorn.org/llms.txt)
