{"uid":"cap_6mmeOihuKCjU0oQttcNw-","slug":"coding-agent-context-api-json-validate-dd044a2d","name":"Coding Agent Context API – JSON Validate","description":"Free need-to-tool routing plus pay-per-call npm docs and TypeScript API signatures, npm breaking-change diffs, JavaScript-rendered browser snapshots and deterministic coding-agent checks via AgentCash/x402.","url":"https://x402-canary.nicolas-x402-16f380a7.workers.dev/v1/json/validate","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"value":{}}},"responseSchema":{"type":"json","example":{"data":{"type":"object"},"meta":{"engine":"json"}}},"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_ZAEETarsoOz3MkMoVYnpL","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 using a deterministic coding-agent check, returning typed metadata about the structure.","exampleAgentPrompt":"Can you validate this JSON value for me and tell me what type it is: {\"name\": \"Alice\", \"age\": 30}?","exampleUseCases":[{"title":"Pre-flight API payload check","prompt":"Before I send this payload to the external API, can you validate it as JSON and confirm the data type? Here it is: {\"userId\": 42, \"action\": \"subscribe\"}."},{"title":"Debugging malformed config file","prompt":"My coding agent just produced this config value and I'm not sure it's valid JSON — can you run it through a deterministic JSON validator and tell me the result: [\"step1\", \"step2\", null]?"},{"title":"Validating dynamic agent output","prompt":"My AI pipeline just returned this value and I need to confirm it's well-formed JSON before storing it: {\"status\": \"ok\", \"count\": 7}. Can you validate it and give me the type info?"}],"resultDescription":"Returns a JSON object with a `data` field containing the inferred type of the submitted value, and a `meta` field indicating the engine used (e.g. `{\"data\":{\"type\":\"object\"},\"meta\":{\"engine\":\"json\"}}`). Allows an agent to confirm whether the supplied value is valid JSON and what kind of structure it is.","failureModes":["Missing or empty `value` field in the request body may result in an error or unexpected type output","Non-JSON-serializable input may cause a parsing failure","Payment not included or insufficient funds (x402 protocol) results in a 402 Payment Required response","Network errors to the Cloudflare Worker endpoint","Malformed request body returns an error response"],"whenToPreferThis":"Choose this endpoint when you need a fast, deterministic, pay-per-call JSON validation check within a coding-agent workflow — particularly when using the x402/AgentCash micropayment protocol. Prefer it over ad-hoc parsing when you need a reliable typed result (`object`, `array`, `string`, etc.) with engine provenance, or when other sibling endpoints in the same suite (npm docs, TypeScript signatures, browser snapshots) are already in use.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:35:40.521Z","isFirstParty":false}