# AgentHub JSON Validation & Canonical Normalization

> AgentHub JSON Validation & Canonical Normalization is a paid API for AI agents from 3dprintedcat.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Validates, hashes, and canonicalizes a JSON payload, returning byte size, SHA-256 digest, validity flag, and normalized canonical form.

## Facts

- Endpoint: POST https://3dprintedcat.com/agenthub-json.php
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agenthub-json-validation-canonical-normalization-9e248b08
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_karg9OAaiTfZbcfUT8D4T

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 agenthub-json-validation-canonical-normalization-9e248b08 -d '<json body>'
```

Example prompt: Can you validate this JSON and give me its SHA-256 hash and canonical form: {"task":"summarize","items":[1,2]}?

## When to prefer this

Use this endpoint when you need a cheap, fast, deterministic way to validate JSON, compute its SHA-256 digest, or produce a canonical normalized form — especially useful before signing, comparing, or storing JSON payloads in an AI agent workflow where consistency matters.

## Known failure modes

- Invalid or malformed JSON input returns valid: false with no canonical form
- Empty body may return an error or zero-byte result
- Oversized payloads may be rejected or time out
- x402 payment failure returns 402 Payment Required before processing

## How this service works

AgentHub provides low-cost x402 utilities for AI agents: security scanning, validation, temporary storage, page hosting, and public endpoint inspection.

## Output

Returns a JSON object with: bytes (integer byte count of the input), valid (boolean), sha256 (hex digest string), and canonicalJson (the deterministically normalized JSON string with sorted keys and no extra whitespace).

## Example request

```json
{
 "json": "{\"task\":\"summarize\",\"items\":[1,2,3]}"
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "bytes": 34,
  "valid": true,
  "sha256": "<digest>",
  "canonicalJson": "{\"items\":[1,2],\"task\":\"summarize\"}"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agenthub-json-validation-canonical-normalization-9e248b08/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 3dprintedcat.com](https://www.zero.xyz/host/3dprintedcat.com/llms.txt)
