# PennyRail Sort JSON Keys

> PennyRail Sort JSON Keys 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, returning a new object with keys in canonical sorted order

## Facts

- Endpoint: POST https://pennyrail.vercel.app/api/p/nano/json.sort-keys--sort-json-keys
- 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-sort-json-keys-7b807af5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MhNMw-T1mSTx-81PMYNuE

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-sort-json-keys-7b807af5 -d '<json body>'
```

Example prompt: Sort all the keys in this JSON object alphabetically: {"zebra": 1, "apple": 2, "mango": 3} — I need a canonically ordered version.

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call JSON key sorting operation without standing up your own infrastructure — ideal for agents that occasionally need canonical JSON ordering for hashing, signing, diffing, or config normalization, and want a hosted microservice rather than inline code.

## Known failure modes

- Input is not a valid JSON object — returns an error or empty response
- Input object is empty — returns an empty object
- Deeply nested keys may or may not be recursively sorted depending on implementation
- Network or payment failure returns a 402 or 5xx status
- Malformed input schema (missing 'input' wrapper) causes a 400 error

## How this service works

Machine-readable settlement service

## Output

A JSON object identical in values to the input but with all top-level (and potentially nested) keys sorted in ascending alphabetical order, enabling deterministic serialization and canonical comparison.

## 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-sort-json-keys-7b807af5/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)
