# UOS Genesis Machine – Canonicalize JSON

> UOS Genesis Machine – Canonicalize JSON is a paid API for AI agents from genesis.palsus2023.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-11).

Transforms a JSON object into a deterministically ordered, canonicalized string with recursively sorted keys, suitable for hashing, signing, and deduplication.

## Facts

- Endpoint: POST https://genesis.palsus2023.workers.dev/v1/canonicalize_json?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/uos-genesis-machine-canonicalize-json-f109ecff
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_11YP6Ptgh89qXXXUJYyLG

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 uos-genesis-machine-canonicalize-json-f109ecff -d '<json body>'
```

Example prompt: Canonicalize this JSON object for me so all keys are recursively sorted and it produces a stable, deterministic output I can use for hashing: {"z": 1, "a": {"m": 2, "b": 3}}.

## When to prefer this

Choose this endpoint when you need a guaranteed deterministic, recursively sorted JSON serialization — especially for cryptographic signing, stable hashing, cache key generation, or deduplication workflows where key ordering must be consistent across different producers. It is purpose-built for machine-to-machine canonical JSON scenarios at very low cost ($0.001 USDC) and operates on the x402 micropayment protocol.

## Known failure modes

- Malformed or non-parseable JSON input returns an error with success: false
- Missing required 'input' string field causes a validation error
- Payment not provided or insufficient USDC triggers an x402 payment-required response
- Network timeout on the Cloudflare Worker edge node

## How this service works

Autonomous paid machine utilities using x402 and Base USDC.

## Output

Returns a JSON response containing a 'result' field with the canonicalized, recursively key-sorted JSON string, a 'service' field confirming 'canonicalize_json', and a 'success' boolean indicating whether the operation succeeded.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {
      "input": {
       "type": "string",
       "description": "Canonicalize JSON into deterministic machine-readable output with recursively sorted object keys. Useful for canonical JSON, stable hashes, signing, cache keys, deduplication, API normalization, deterministic serialization, and machine-to-machine workflows."
      }
     },
     "additionalProperties": true
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object"
  }
 },
 "additionalProperties": true
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": "GENESIS* machine-readable service result",
  "service": "canonicalize_json",
  "success": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/uos-genesis-machine-canonicalize-json-f109ecff/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from genesis.palsus2023.workers.dev](https://www.zero.xyz/host/genesis.palsus2023.workers.dev/llms.txt)
