{"uid":"cap_Omxz4UWJcrVkQQT6gJu1Y","slug":"canonicalhash-structured-json-extraction-8ffd0085","name":"CanonicalHash Structured JSON Extraction","description":"Deterministic JSON hashing and structured extraction for AI agents. Three paid routes: /v1/canonicalize (RFC 8785 canonicalization + SHA-256/512 + EIP-712 attestation, $0.002), /v1/canonicalize/batch (up to 1000 payloads, $0.01), /v1/structure/paid (structured JSON extraction from messy text, $0.005). Every successful response includes an EIP-712 signed attestation verifiable against /.well-known/pubkey.json. Verify any attestation for free at POST /v1/verify.","url":"https://canonicalhash-production.up.railway.app/v1/structure/paid?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"Messy text to extract structured data from."},"schema":{"type":"object","description":"Optional JSON Schema describing the fields to extract."}}},"responseSchema":{"type":"json","example":{"tier":1,"method":"deterministic","signer":"0x0326f9783c9C9b9De8b9dC63cCCefDC75A95C7cD","payment":{"txHash":"0x...truncated","settled":true},"success":true,"chain_id":8453,"issued_at":"2026-10-16T00:00:00.000Z","signature":"0x7a1c...truncated","confidence":0.98,"elapsed_ms":12,"structured":{"name":"Alice Smith","email":"alice@example.com","amount":1250,"company":"ACME Corp","due_date":"2026-11-01"},"attestation_type":"EIP-712","extracted_fields":5,"requested_fields":5}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_tEmXCuKI-4BpDWRRxKfQf","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts structured, typed fields from messy or unstructured text using an optional JSON schema, returning results with an EIP-712 signed attestation for tamper-proof verification.","exampleAgentPrompt":"Pull structured fields — name, email, company, amount, and due date — from this messy invoice text: 'Bill to Alice Smith at alice@example.com, ACME Corp owes $1,250 by November 1st, 2026.' Return the results with a signed attestation I can verify later.","exampleUseCases":[{"title":"Invoice data extraction for accounting","prompt":"I have a blob of text from a scanned invoice: 'Vendor: ACME Corp, Contact: alice@example.com, Total Due: $3,400.00, Payment Due: December 15, 2026.' Can you extract the vendor name, contact email, amount, and due date as structured JSON, and give me a signed attestation I can keep for my records?"},{"title":"Contact info parsing from email body","prompt":"Here's a messy email signature block: 'John Doe | Senior Engineer | john.doe@techco.io | +1-415-555-0192 | TechCo, Inc.' Extract the name, email, phone, title, and company from it as structured fields."},{"title":"Form submission normalization for CRM ingestion","prompt":"I've got a bunch of unstructured text from a web form submission — 'My name is María García, I run Solaris Logistics, reach me at maria@solaris.io, looking to spend around $50k, timeline is Q1 2027.' Extract name, company, email, budget, and timeline from this so I can push it into our CRM."}],"resultDescription":"Returns a JSON object containing: extracted structured fields (keyed by schema or inferred), the number of extracted and requested fields, a confidence score (0–1), elapsed processing time in milliseconds, the extraction method, an EIP-712 signed attestation with signer address, chain ID, and issued timestamp, and payment settlement details including transaction hash.","failureModes":["Text is too ambiguous or short to extract meaningful fields — returns low confidence score or empty structured object","Optional schema specifies fields that cannot be found in the text — missing fields returned as null with reduced confidence","Payment not settled or invalid transaction — returns payment error, extraction not performed","Malformed input JSON — returns 400 validation error","Schema provided does not conform to JSON Schema spec — returns schema validation error","Service unavailable on Railway infrastructure — returns 503 or timeout"],"whenToPreferThis":"Choose this endpoint when you need to turn free-form, unstructured text (emails, invoices, form submissions, notes) into typed, machine-readable JSON fields and want a cryptographically signed EIP-712 attestation alongside the result for auditability or downstream verification. Prefer it over generic LLM extraction when you need tamper-evident provenance on the extracted data, or when integrating into a pipeline that validates results against /.well-known/pubkey.json. It is especially valuable in financial, legal, or compliance contexts where you need a verifiable paper trail tied to a blockchain-compatible signature.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T06:42:24.046Z","isFirstParty":false,"canonicalSlug":"canonicalhash-structured-json-extraction-8ffd0085"}