# JSON Object Sort Keys

> JSON Object Sort Keys is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Sorts the keys of a top-level JSON object into deterministic alphabetical order and returns the reordered object.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/json-object-sort-keys
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-object-sort-keys-e30a0f50
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_D89Fe8M50c-tfaEm9Mo48

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

Example prompt: Sort the keys of this JSON object into alphabetical order so the output is deterministic: {"zebra": 1, "apple": 2, "mango": 3}.

## When to prefer this

Choose this endpoint when you need a fast, cheap, stateless, and deterministic sort of a JSON object's top-level keys — especially before passing structured data to a downstream tool with a strict key-order contract, computing a canonical hash, or performing reliable diffs. It is preferable over rolling your own sort logic when you want a versioned, auditable result contract with counts and normalization metadata.

## Known failure modes

- Object exceeds 128 top-level properties — request rejected with validation error
- Input is not a valid JSON object (e.g. array or primitive) — type error returned
- Malformed request body — 400 bad request
- Payment not included or insufficient — 402 payment required
- Network timeout or server unavailability — 5xx error

## How this service works

JSON Object Sort Keys: JSON Object Sort Keys returns a top-level JSON object with deterministic key order from bounded caller-supplied values without an external provider. Call JSON Object Sort Keys before an agent hands structured data or a batch plan to a downstream tool with a stricter contract. Returns the bounded transformation or validation finding with counts, normalized values, and a versioned result contract for JSON Object Sort Keys as versioned deterministic JSON. Price: $0.001 USDC…

## Output

Returns the input JSON object with its top-level keys reordered in deterministic (alphabetical) order, along with metadata such as key counts, normalized values, and a versioned result contract. The response is structured deterministic JSON.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "object": {
   "type": "object",
   "description": "Object supplied to JSON Object Sort Keys; used only for this bounded calculation and processed in memory without retention.",
   "maxProperties": 128,
   "additionalProperties": true
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "object": {
    "a": 1,
    "b": 2
   }
  },
  "schema": "delx/util-json-object-sort-keys/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "2fd1739c776c376dda0799d0fc33b1035ca1fae723be64a512059abbf5471691",
   "external_calls": 0
  },
  "operation": "data_batch:json_object_sort_keys"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-object-sort-keys-e30a0f50/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
