{"uid":"cap_mvDA5pTKWW07VQxYvKWia","slug":"agent-data-bench-json-schema-inference-c5617e8e","name":"Agent Data Bench – JSON Schema Inference","description":"Infer a JSON Schema (draft 2020-12) from an example JSON value: nested objects, arrays, required keys, integer vs number, and string formats (date, date-time, email, uri, uuid). Useful for tool definitions and structured-output contracts.","url":"https://x402.deepsense.stream/api/v1/json/schema?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"value":{"description":"Any JSON value to infer a schema from"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ZsqsKhWcImw-eHRKd-t8y","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","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 (draft 2020-12) from an example JSON value, detecting nested objects, arrays, required keys, integer vs number, and common string formats.","exampleAgentPrompt":"Can you infer a JSON Schema (draft 2020-12) from this example JSON for me? I want to know the types, required keys, and any detected string formats like dates or emails: {\"id\": \"123e4567-e89b-12d3-a456-426614174000\", \"email\": \"user@example.com\", \"score\": 42, \"createdAt\": \"2024-01-15\", \"tags\": [\"a\", \"b\"]}","exampleUseCases":[{"title":"Schema contract for LLM structured output","prompt":"I'm building a structured output contract for my LLM — can you infer a JSON Schema from this example response so I know the exact types and required fields? {\"name\": \"Alice\", \"age\": 30, \"email\": \"alice@example.com\", \"joinedAt\": \"2023-06-01T12:00:00Z\"}"},{"title":"Tool definition from API response sample","prompt":"I have a sample API response and need a formal JSON Schema (draft 2020-12) for it to use as a tool definition — can you infer one from this? {\"orderId\": \"a1b2c3\", \"total\": 99.95, \"items\": [{\"sku\": \"ABC\", \"qty\": 2}], \"shippedAt\": null}"},{"title":"Validating user-submitted form data","prompt":"I want to validate user-submitted JSON against a schema — can you look at this example payload and produce a JSON Schema with required keys and string format detection for things like UUIDs and emails? {\"userId\": \"550e8400-e29b-41d4-a716-446655440000\", \"email\": \"bob@mail.com\", \"birthdate\": \"1990-04-25\"}"}],"resultDescription":"A JSON Schema (draft 2020-12) document describing the structure of the input JSON value, including: inferred types for each field (string, integer, number, boolean, null, object, array), required key lists, nested object schemas, array item schemas, and string format annotations (date, date-time, email, uri, uuid) where detected.","failureModes":["Invalid or malformed JSON input returns an error response","Missing 'value' parameter results in a bad request error","Extremely deeply nested JSON may have reduced format detection accuracy","Very large JSON payloads may time out or be rejected","Ambiguous values (e.g. a string that looks like multiple formats) may produce conservative type annotations"],"whenToPreferThis":"Choose this endpoint when you need to automatically derive a formal JSON Schema (draft 2020-12) from an example JSON value, especially for building tool definitions, structured-output contracts, or validation schemas for AI agents. It is particularly valuable when the JSON contains mixed types, nested objects, arrays, or string values that may encode formats like dates, UUIDs, or emails — all of which it detects automatically. Prefer it over hand-writing schemas or using general-purpose LLM inference when you need a standards-compliant, deterministic schema with accurate required-key detection.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T12:30:13.641Z","isFirstParty":false,"canonicalSlug":"agent-data-bench-json-schema-inference-c5617e8e"}