# JSON Sort Keys Transform

> JSON Sort Keys Transform is a paid API for AI agents from agentshelf.syntexa.ch, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-02).

Rewrites a JSON string with all object keys sorted alphabetically at every nesting level

## Facts

- Endpoint: POST https://agentshelf.syntexa.ch/v1/json-sort-keys?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-sort-keys-transform-263d2001
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xjsZbDz85_u6H29eYx16z

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-sort-keys-transform-263d2001 -d '<json body>'
```

Example prompt: Can you sort all the keys in this JSON alphabetically, including nested objects? Here's the JSON: {"zebra":1,"apple":{"mango":2,"banana":3}}

## When to prefer this

Use this endpoint when you need a pure, offline, deterministic alphabetical sort of JSON object keys with no external network calls. It is ideal for canonicalizing JSON for diffing, snapshot testing, or standardization. Prefer the free unpaid endpoint at POST /v1/sandbox/json-sort-keys if available to avoid the $0.002 USDC cost.

## Known failure modes

- Invalid JSON input returns an error indicating the text could not be parsed
- Input exceeding 100,000 characters is rejected
- Empty string input is rejected due to minLength:1 constraint
- Payment of exactly $0.002 USDC required; incorrect payment amount results in payment failure

## How this service works

Call when an agent needs JSON rewritten with the sort-keys transform. No network. Exact $0.002 USDC. Prefer unpaid POST /v1/sandbox/json-sort-keys first.

## Output

A JSON string identical in structure and values to the input, but with all object keys sorted alphabetically at every nesting level. Arrays maintain their original order; only object key ordering is changed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "examples": [
    "{\"b\":1,\"a\":2}"
   ],
   "maxLength": 100000,
   "minLength": 1,
   "description": "Input for this SKU. The route description says whether it is plain text, a URL, base64 bytes, or an already-encoded token."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-sort-keys-transform-263d2001/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentshelf.syntexa.ch](https://www.zero.xyz/host/agentshelf.syntexa.ch/llms.txt)
