{"uid":"cap_X7jk3t5jTuQnTqIOf8gwk","slug":"json-schema-generator-from-example-json-664c4497","name":"JSON Schema Generator from Example JSON","description":"Generate a JSON Schema (draft 2020-12) from an example JSON: types, properties, arrays, required fields and formats (date, date-time, email, uri). For API docs, tool definitions and output validation.","url":"https://api.vextorium.com/generar-esquema-json-pago?utm_source=zero.xyz","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":{"required":["ejemplo"],"properties":{"ejemplo":{"description":"Example JSON (object or text)"}}},"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","null"],"properties":{"esquema":{"type":["object","null"],"properties":{"type":{"type":["string","null"]},"$schema":{"type":["string","null"]},"required":{"type":["array","null"],"items":{"type":["null","string"]}},"properties":{"type":["object","null"],"properties":{"id":{"type":["object","null"],"properties":{"type":{"type":["string","null"]}}},"tags":{"type":["object","null"],"properties":{"type":{"type":["string","null"]},"items":{"type":["object","null"],"properties":{"type":{"type":["string","null"]}}}}},"email":{"type":["object","null"],"properties":{"type":{"type":["string","null"]},"format":{"type":["string","null"]}}},"created":{"type":["object","null"],"properties":{"type":{"type":["string","null"]},"format":{"type":["string","null"]}}}}}}}}}}}}},"responseSchema":{"type":"json","example":{"esquema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["id","email","tags","created"],"properties":{"id":{"type":"integer"},"tags":{"type":"array","items":{"type":"string"}},"email":{"type":"string","format":"email"},"created":{"type":"string","format":"date"}}}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_3SNGa3RmQjykOay-AHHbo","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates a JSON Schema (draft 2020-12) from an example JSON object, inferring types, properties, arrays, required fields, and formats like date, email, and URI.","exampleAgentPrompt":"Take this example JSON — {\"id\": 1, \"email\": \"user@example.com\", \"tags\": [\"beta\", \"vip\"], \"created\": \"2024-01-15\"} — and generate a JSON Schema draft 2020-12 from it, inferring the types, required fields, arrays, and formats like email and date.","exampleUseCases":[{"title":"API documentation schema generation","prompt":"I have this sample API response: {\"userId\": 42, \"email\": \"alice@example.com\", \"createdAt\": \"2024-06-01T10:00:00Z\", \"roles\": [\"admin\", \"user\"]} — can you generate a JSON Schema draft 2020-12 from it so I can document my API?"},{"title":"LLM tool output validation schema","prompt":"I want to validate the output of my AI tool. Here's an example of what it returns: {\"title\": \"Summary\", \"url\": \"https://example.com\", \"publishedDate\": \"2024-05-20\", \"tags\": [\"news\"]} — generate a JSON Schema from this so I can use it for output validation."},{"title":"Form data schema for developer onboarding","prompt":"Can you turn this sample form submission JSON into a JSON Schema? The example is: {\"name\": \"Jane Doe\", \"email\": \"jane@acme.com\", \"company\": \"Acme Inc\", \"joinedAt\": \"2023-12-01\", \"plan\": \"pro\"} — I need it in draft 2020-12 format with required fields detected."}],"resultDescription":"Returns a JSON Schema object conforming to draft 2020-12, with inferred `type`, `$schema`, `required` array, and `properties` for each field. Property definitions include type inference (integer, string, array, object) and format annotations (email, date, date-time, uri) where applicable. Array items are typed based on the example values.","failureModes":["Missing 'ejemplo' field in request body results in validation error","Non-parseable JSON text in 'ejemplo' field may produce incomplete or error schema","Deeply nested or recursive structures may not be fully inferred","Empty JSON object input may return a minimal schema with no properties","Network or payment authentication failure returns 402 or 5xx error"],"whenToPreferThis":"Choose this endpoint when you need to quickly auto-generate a JSON Schema draft 2020-12 from a concrete example JSON, especially for API documentation, LLM tool definitions, or output validation pipelines. It is ideal when you have a sample payload but no hand-written schema, and need format detection (email, date, URI) out of the box. Prefer this over hand-authoring schemas when working in automated or agentic workflows where a schema needs to be programmatically derived from example data at runtime.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T00:41:20.186Z","isFirstParty":false,"canonicalSlug":"json-schema-generator-from-example-json-664c4497"}