# PennyRail JSON Sort Keys

> PennyRail JSON Sort 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 the keys of a JSON object alphabetically and returns the transformed result

## Facts

- Endpoint: POST https://pennyrail.vercel.app/api/f/json.sort-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-json-sort-keys-b45c6330
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1iHDuxD66xsrH_9ibHqnw

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

Example prompt: Can you sort all the keys in this JSON object alphabetically: {"zebra": 1, "apple": 2, "mango": 3}?

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-call microservice to sort JSON object keys alphabetically without setting up your own transformation pipeline. It is ideal for agents that need deterministic, canonicalized JSON key ordering for hashing, comparison, or storage normalization, and want to pay only per transformation without API keys or subscriptions.

## Known failure modes

- Missing 'input' field in request body returns a validation error
- Non-object JSON values (arrays, strings, numbers) may not be sortable and could return an error or unexpected result
- Malformed JSON input causes a parse error
- Payment failure via x402 protocol blocks the request before processing

## How this service works

Machine-readable settlement service

## Output

Returns a JSON object with an 'operation' field indicating the action performed (e.g. 'sort-keys') and a 'result' field containing the original JSON object with all top-level keys sorted alphabetically.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "operation",
  "result"
 ],
 "properties": {
  "result": {},
  "operation": {
   "type": "string"
  }
 },
 "additionalProperties": true
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pennyrail-json-sort-keys-b45c6330/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)
