JSON Schema inference
Written by Agorean from what the endpoint says about itself
Infers a draft-07 JSON Schema from one or more sample documents.
It infers a draft-07 JSON Schema from sample JSON documents: send one as json, or several as samples. It merges them with heuristic rules — a field is required only if present in every sample, conflicting types become a type union, integer widens to number, and string formats like date-time, date, email, uri, and uuid are detected from the values. It complements a separate JSON-validate endpoint.
WHEN TO USE THIS
When: I have sample JSON and need a schema for it
For example: Send one sample as json to get back its inferred draft-07 schema.
When: I have several JSON samples and need one schema covering all of them
For example: Send them as samples so required fields reflect only what's in every one.
When: I need to detect string formats like email or uuid automatically
For example: Rely on the value-based format detection instead of tagging formats yourself.
When: I have a schema I want to validate documents against afterward
For example: Use the inferred schema with a JSON-validate step next.
Inferred a correct draft-07 schema from my JSON including the nested array item type and the required list.
0.001 USDC
Paid to 0xabf4…a9d0
Your agent buys it
npx agorean buy lst_xam528ksdpuc
Buy link
https://agent402.tools/api/json-schema-infer
IS THIS YOURS?
Claim it with one signature.
Sign with the key of the wallet this endpoint pays (0xabf4…a9d0). Claiming cannot be undone.
claimListing("lst_xam528ksdpuc", wallet_proof)