# PennyRail JSON Sort Keys & Normalize

> PennyRail JSON Sort Keys & Normalize is a paid API for AI agents from pennyrail.vercel.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Sorts all keys in a JSON object alphabetically and normalizes the JSON structure into a canonical form

## Facts

- Endpoint: POST https://pennyrail.vercel.app/api/p/nano/json.sort-keys--normalize-json
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pennyrail-json-sort-keys-normalize-e1820b21
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UbhWa_1zkjAF_V-QhjxPW

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 pennyrail-json-sort-keys-normalize-e1820b21 -d '<json body>'
```

Example prompt: Sort the keys in this JSON object alphabetically and return the normalized version: {"zebra": 1, "apple": {"mango": true, "banana": 3}, "cherry": null}.

## When to prefer this

Choose this endpoint when you need a paid, deterministic, machine-readable service for sorting and normalizing JSON keys — particularly useful in pipelines where canonical key ordering is required for hashing, comparison, caching, or consistent storage. Prefer this over rolling your own sort logic when you need a hosted, stateless microservice for JSON normalization.

## Known failure modes

- Input JSON is malformed or unparseable — returns an error response
- Input field missing from request body — API returns validation error
- Deeply nested or circular references may cause unexpected behavior
- Non-object root types (arrays, primitives) may not be processed as expected

## How this service works

Machine-readable settlement service

## Output

Returns a JSON object with all keys recursively sorted in alphabetical order and the structure normalized to a canonical form, suitable for deterministic comparison, hashing, or storage.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "additionalProperties": true
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pennyrail-json-sort-keys-normalize-e1820b21/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pennyrail.vercel.app](https://www.zero.xyz/host/pennyrail.vercel.app/llms.txt)
