{"uid":"cap_Gem3EsT2g3ELZVVyKwKj4","slug":"json-schema-inference-validation-api-eb98f42b","name":"JSON Schema Inference & Validation API","description":"A public journal about ideas, systems, experiments, projects, and learning.","url":"https://api.iamjuliand.com/v1/json/schema","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","allOf":[{"if":{"properties":{"mode":{"const":"infer"}}},"then":{"required":["samples"]}},{"if":{"properties":{"mode":{"const":"validate"}}},"then":{"required":["value","schema"]}}],"required":["mode"],"properties":{"mode":{"enum":["infer","validate"],"type":"string"},"value":{},"schema":{"type":"object"},"samples":{"type":"array","maxItems":100,"minItems":1}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["productVersion","deterministic","mode","valid","schema","inconsistencies","errors"],"properties":{"mode":{"enum":["infer","validate"],"type":"string"},"valid":{"type":"boolean"},"errors":{"type":"array"},"schema":{"type":"object"},"deterministic":{"const":true},"productVersion":{"type":"string"},"inconsistencies":{"type":"array"}}}}}}},"responseSchema":{"type":"json","example":{"mode":"infer","valid":true,"errors":[],"schema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["active","id"],"properties":{"id":{"type":"integer"},"active":{"type":"boolean"}}},"deterministic":true,"productVersion":"1.0.0","inconsistencies":[]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.006","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.006/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.006","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.006","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Hoq5L0taXiauhFB76-nqX","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.006","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Infers a JSON Schema from a JSON payload and validates whether a given JSON document conforms to a schema, returning validation results, detected errors, and schema inconsistencies.","exampleAgentPrompt":"Can you infer a JSON Schema from this sample object: {\"id\": 42, \"active\": true, \"name\": \"Alice\"} — use infer mode and tell me if the schema is valid and deterministic?","exampleUseCases":[{"title":"Infer schema from API response","prompt":"I have a JSON response from an external API and I need to auto-generate a JSON Schema for it — the object looks like {\"userId\": 1, \"verified\": false, \"email\": \"test@example.com\"}. Can you infer the schema and tell me if it's deterministic?"},{"title":"Validate JSON config file","prompt":"Can you validate this JSON config against my schema? The document is {\"id\": 5, \"active\": true} and I want to know if it's valid, and if there are any errors or inconsistencies."},{"title":"Debug schema errors in data pipeline","prompt":"My data pipeline is producing JSON objects and I think the schema has inconsistencies — can you run {\"id\": \"abc\", \"active\": null} through the schema inferrer and show me all validation errors and inconsistencies it finds?"}],"resultDescription":"Returns a JSON object containing: whether the input is valid (boolean), a list of validation errors, an inferred JSON Schema object (using draft 2020-12), a deterministic flag indicating whether the schema is fully determined, a list of schema inconsistencies, the inference mode used, and a product version string.","failureModes":["Malformed JSON input returns a validation error list with parsing failures","Invalid or conflicting schema properties may produce non-deterministic results flagged in the inconsistencies array","Missing required fields in the request body may return a 400-level error","Ambiguous JSON structures (e.g. mixed-type arrays) may yield partial or non-deterministic schemas"],"whenToPreferThis":"Choose this endpoint when you need to automatically derive a JSON Schema from a sample document, validate a JSON payload against a schema with detailed error reporting, or detect structural inconsistencies in JSON data. It is especially useful during API development, data pipeline validation, or when reverse-engineering schemas from unknown JSON sources. Prefer this over generic JSON linters when you need a full schema object back alongside validation results.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:33:51.431Z","isFirstParty":false}