# KEVAREMESH JSON Stable Canonicalize

> KEVAREMESH JSON Stable Canonicalize is a paid API for AI agents from kevaremesh-web.vercel.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-24).

Converts any JSON value into a deterministic, lexicographically-ordered canonical JSON string and returns its byte length and SHA-256 hash.

## Facts

- Endpoint: POST https://kevaremesh-web.vercel.app/api/x402/json-stable-canonicalize?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-24
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/kevaremesh-json-stable-canonicalize-13fd3052
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dbkIDeAPVj3gMeG85kMt1

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 kevaremesh-json-stable-canonicalize-13fd3052 -d '<json body>'
```

Example prompt: Can you canonicalize this JSON object for me — {"b": 2, "a": 1} — sorting the keys lexicographically and giving me the stable canonical string along with its SHA-256 hash?

## When to prefer this

Use this endpoint when you need a deterministic, reproducible canonical JSON string for cryptographic signing, content hashing, or equality comparison, and you want the output in the KEVAREMESH stable JSON v1 format (lexicographic UTF-16 key ordering). Note this is NOT RFC 8785/JCS-compliant, so prefer it for internal fingerprinting workflows rather than interoperability with JCS-mandating standards.

## Known failure modes

- Invalid or malformed input that cannot be parsed as JSON returns an error
- Extremely deeply nested or circular-reference objects may fail or time out
- Network or payment gateway failures return HTTP 402 or 5xx errors
- Missing or invalid x402 payment header causes authentication failure

## How this service works

Buyer-first MCP procurement gateway that discovers, compares and routes live x402 APIs without making the buyer choose a provider.

## Output

Returns a canonical JSON string with all object keys sorted in lexicographic UTF-16 order, arrays with preserved order, along with the byte length of the canonical output, the SHA-256 hex digest of that canonical string, and metadata including algorithm name and product identifier.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "value": {}
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "bytes": 13,
   "sha256": "sha256_hex",
   "algorithm": "kevaremesh-stable-json-v1",
   "key_order": "lexicographic_utf16",
   "canonical_json": "{\"a\":1,\"b\":2}",
   "arrays_preserve_order": true
  },
  "product": "kevaremesh_json_stable_canonicalize_v2",
  "service": "KEVAREMESH",
  "tool_name": "kevaremesh_json_stable_canonicalize",
  "limitations": [
   "KEVAREMESH stable JSON v1; not advertised as RFC 8785/JCS"
  ],
  "generated_at": "2026-09-18T00:00:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/kevaremesh-json-stable-canonicalize-13fd3052/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from kevaremesh-web.vercel.app](https://www.zero.xyz/host/kevaremesh-web.vercel.app/llms.txt)
