{"uid":"cap_5oL20eh4rLt1Sa1953Xix","slug":"capi2-json-canonicalize-sha-256-hash-a4f040c7","name":"capi2 JSON Canonicalize & SHA-256 Hash","description":"Paid x402 utilities and live intelligence for autonomous agents: hashing/encoding plus public web lookup, domain intelligence, API discovery audit, evidence extraction and x402 health.","url":"https://capi2-demand-tools.onrender.com/v1/json/canonicalize","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"value":{"description":"Any JSON value to canonicalize."}}},"responseSchema":{"type":"json","example":{"sha256":"43258cff...","canonical":"{\"a\":1,\"b\":2}"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.0005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_vjlPY86NtkfbM-bHdENky","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Accepts any JSON value, returns a canonical (deterministically ordered) JSON string and its SHA-256 hash via the x402 pay-per-call protocol.","exampleAgentPrompt":"Can you canonicalize this JSON object and give me its SHA-256 hash? The object is {\"b\": 2, \"a\": 1, \"c\": {\"z\": 9, \"y\": 8}}.","exampleUseCases":[{"title":"Fingerprint API response for caching","prompt":"Take this API response JSON and give me its canonical form and SHA-256 fingerprint so I can use it as a cache key: {\"status\":\"ok\",\"results\":[1,2,3],\"meta\":{\"page\":1}}."},{"title":"Verify two payloads match","prompt":"I have two JSON blobs that should be the same data but with different key orderings — can you canonicalize both and return their hashes so I can confirm they're identical?"},{"title":"Pre-sign JSON document normalization","prompt":"Before I sign this JSON contract with my private key I need it in canonical form with deterministic key order — please canonicalize {\"signedBy\":\"alice\",\"amount\":500,\"currency\":\"USD\"} and give me the SHA-256 hash I should sign."}],"resultDescription":"Returns a JSON object containing two fields: 'canonical' — the input JSON serialized with deterministically sorted keys (RFC 8785 / JSON Canonicalization Scheme style) — and 'sha256' — the hex-encoded SHA-256 hash of that canonical string, usable as a stable fingerprint.","failureModes":["Invalid or unparseable JSON input returns an error","Missing 'value' field in request body may return a 400 or empty canonical","Payment not included or insufficient USDC results in 402 Payment Required","Network timeout on Render cold-start free tier causing delayed first response","Deeply nested or extremely large JSON may hit size limits"],"whenToPreferThis":"Choose this endpoint when you need a deterministic, order-independent fingerprint of a JSON value — for cache keys, content-addressable storage, pre-signature normalization, or deduplication. It is preferable over rolling your own canonicalization when you need a hosted, pay-per-use micro-service compatible with the x402 autonomous agent payment protocol.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:39:39.654Z","isFirstParty":false}