{"uid":"cap_0jxCHM3jxlwabN1uzb7lL","slug":"json-schema-infer-d0edf550","name":"JSON Schema Infer","description":"Infer a basic JSON Schema (types, object properties, array item type) from an example document.","url":"https://x402.agentindex.world/json/schema-infer?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"data":{"title":"Data"}}},"responseSchema":{"type":"json","example":{"schema":{"type":"object","required":["name","age","active"],"properties":{"age":{"type":"integer"},"name":{"type":"string"},"active":{"type":"boolean"}}}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_g2gvSISVUH8Rtu1zG_7Wb","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Infers a JSON Schema from a provided JSON data sample, returning a typed schema with required fields and property types.","exampleAgentPrompt":"Can you infer a JSON Schema from this data: {\"name\": \"Alice\", \"age\": 30, \"active\": true}? I want to know the types and which fields are required.","exampleUseCases":[{"title":"Auto-generate API contract from example","prompt":"I have a sample JSON response from an API I'm integrating with — {\"id\": 42, \"username\": \"bob\", \"verified\": false} — can you infer the JSON Schema so I can use it for validation?"},{"title":"Validate data pipeline output structure","prompt":"Our pipeline produces records like {\"product_id\": \"ABC123\", \"price\": 9.99, \"in_stock\": true}. Can you derive a JSON Schema from that so I can use it to validate future records?"},{"title":"Document unknown data format","prompt":"I received this JSON from a third-party service: {\"event\": \"click\", \"timestamp\": 1712345678, \"user_id\": \"u_99\"}. What JSON Schema does it follow — what are the types and required fields?"}],"resultDescription":"Returns a JSON Schema object describing the inferred structure of the provided data, including property types (string, integer, boolean, etc.) and a list of required fields.","failureModes":["Missing or empty 'data' parameter returns an error or empty schema","Malformed/non-JSON input may produce an incorrect or partial schema","Deeply nested or polymorphic data may result in simplified or overly generic schema","Payment failure (x402) if USDC balance on Base is insufficient"],"whenToPreferThis":"Use this endpoint when you have a sample JSON object and need a machine-readable schema definition automatically — particularly useful for building validators, documenting APIs, or bootstrapping data contracts without manually writing schemas.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T12:38:42.505Z","isFirstParty":false,"canonicalSlug":"json-schema-infer-d0edf550"}