# Delx Sort Keys

> Delx 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-14).

Returns the keys of a JSON object sorted lexicographically, enabling deterministic/stable JSON key ordering for hashing and fingerprinting pipelines.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/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/delx-sort-keys-3eb1c839
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_exW6X_kdFVS7RqC7d6D7m

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 delx-sort-keys-3eb1c839 -d '<json body>'
```

Example prompt: Sort the keys of this JSON object lexicographically so I can use it for stable hashing: {"zebra": 1, "apple": 2, "mango": 3}.

## When to prefer this

Choose this endpoint when you need a lightweight, stateless, first-party utility to canonicalize JSON key order before hashing, signing, or cache-keying — especially as a preflight step in an agent pipeline that already uses other Delx micro-utils. Prefer it over custom sorting logic when you want a guaranteed lexicographic sort with no side effects, no data retention, and a predictable $0.001 USDC cost per call.

## Known failure modes

- Missing or null 'object' field returns a validation error
- Non-object input (e.g. array or primitive) returns a type error
- Malformed JSON body returns a parse error
- Payment not provided or insufficient USDC balance returns a 402 Payment Required
- Empty object returns an empty key array (valid but trivial result)

## How this service works

Return object keys sorted lexicographically for stable hashes — first-party local utility for agent preflight and proven micro-utils expansion. Returns deterministic machine-readable JSON for $0.001 USDC via x402 on Base. Execution is first-party, local-only, stateless, and memory-only with no paid upstream, no input retention, no web search, no live RPC, and no mediagen. Results are advisory; the caller owns authorization, budgets, and production controls. Sibling of Delx routes that already c…

## Output

Returns the input object's keys sorted in lexicographic (alphabetical) order as a deterministic, machine-readable JSON structure. The response enables downstream steps — such as stable hashing, signature computation, or cache key generation — to operate on a predictable, canonical key sequence regardless of the original insertion order.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "object": {
   "type": "object",
   "description": "Input field: object."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "keys": [
   "a",
   "b"
  ],
  "count": 2,
  "object": {
   "a": 2,
   "b": 1
  },
  "schema": "delx/util-sort-keys/v1"
 }
}
```

## More

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