{"uid":"cap_3HfQObRdHZy8Ctj-uH_Ej","slug":"x402-convert-json-validate-6e5791bb","name":"x402-convert JSON Validate","description":"Deterministic data-conversion API for AI agents. Pay-per-call in USDC on Base via x402 v2.","url":"https://x402-convert.arikanuk.workers.dev/json-validate?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"data":{"description":"Any JSON value to validate"},"schema":{"type":"object","properties":{"types":{"type":"object","additionalProperties":{"type":"string"}},"required":{"type":"array","items":{"type":"string"}}}}}},"responseSchema":{"type":"json","example":{"valid":true,"errors":[]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_SFtCeIOv2s2TgwQU0aoPN","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates a JSON value against a schema specifying field types and required fields, returning a validity flag and list of errors.","exampleAgentPrompt":"Can you validate this JSON object against a schema where 'name' must be a string and 'age' must be a number, with both marked as required? The data is: {\"name\": \"Alice\", \"age\": 30}.","exampleUseCases":[{"title":"Validate API response before processing","prompt":"Before I pass this API response downstream, check if it's valid — it should have 'id' as a string and 'amount' as a number, both required. The data is: {\"id\": \"abc123\", \"amount\": \"99.99\"}."},{"title":"Catch missing required fields in form submission","prompt":"A user submitted a form and I got this JSON: {\"email\": \"user@example.com\"}. Validate it against a schema where 'email', 'name', and 'age' are all required, with 'email' as string, 'name' as string, and 'age' as number — tell me what's missing or wrong."},{"title":"Check pipeline data integrity","prompt":"I'm running a data pipeline and need to verify this record before inserting it into the database: {\"product_id\": 42, \"price\": 9.99, \"in_stock\": true}. Validate it against a schema requiring 'product_id' as number, 'price' as number, and 'in_stock' as boolean."}],"resultDescription":"Returns a JSON object with a 'valid' boolean indicating whether the input data passes the schema, and an 'errors' array listing any validation failures such as missing required fields or type mismatches.","failureModes":["Malformed input JSON causes parsing error","Schema type values that are unrecognized strings may not be validated correctly","Empty or missing 'data' field may return unexpected results","Payment failure via x402 blocks the request before validation occurs","Network timeout on the Cloudflare Worker edge"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-call JSON validation against a simple type-and-required-fields schema without standing up your own validation service. It is ideal for AI agents that occasionally need to verify data structure in a pipeline or before downstream processing, and where a $0.01 USDC micropayment per call is acceptable. Not suited for complex JSON Schema (e.g., pattern matching, nested conditionals, $ref) or high-volume batch validation scenarios.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:34:25.632Z","isFirstParty":false,"canonicalSlug":"x402-convert-json-validate-6e5791bb"}