{"uid":"cap_nSmpKrFh2TtgylPY4Fqe4","slug":"json-depth-check-f6988a71","name":"JSON Depth Check","description":"JSON Depth Check: JSON Depth Check measures JSON nesting depth against a caller budget from bounded caller-supplied values without an external provider. Call JSON Depth Check before an agent hands structured data or a batch plan to a downstream tool with a stricter contract. Returns the bounded transformation or validation finding with counts, normalized values, and a versioned result contract for JSON Depth Check as versioned deterministic JSON. Price: $0.001 USDC via x402 on Base. First-party…","url":"https://api.delx.ai/api/v1/x402/json-depth-check","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"value":{"type":"object","description":"Value supplied to JSON Depth Check; used only for this bounded calculation and processed in memory without retention.","maxProperties":128,"additionalProperties":true},"maximum_depth":{"type":"integer","description":"Maximum Depth supplied to JSON Depth Check; used only for this bounded calculation and processed in memory without retention."}}},"responseSchema":{"type":"json","example":{"result":{"depth":3,"within_budget":true},"schema":"delx/util-json-depth-check/v1","status":"pass","evidence":{"retained":false,"input_sha256":"5e44e9f3ca3a7644d94366cd0375126198b9408327e0f22b573182f0b3a699d3","external_calls":0},"operation":"data_batch:json_depth_check"}},"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_21NuHjC16Y4IsnTOqRVBD","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":"Measures the nesting depth of a JSON object against a caller-supplied maximum depth budget and returns a bounded validation result with counts and normalized values.","exampleAgentPrompt":"Check if this JSON object is within a maximum nesting depth of 5 — I need to know if it'll pass before I send it to the downstream tool that rejects anything deeper.","exampleUseCases":[{"title":"Pre-flight check before tool handoff","prompt":"Before handing this structured batch plan to the execution tool, check whether its JSON nesting depth stays within a maximum of 4 levels — flag it if it's too deep."},{"title":"Validating agent-generated output depth","prompt":"My agent just generated a JSON response object — can you measure its nesting depth and confirm it doesn't exceed 6 levels? Here's the object."},{"title":"Enforcing schema contract in a pipeline","prompt":"I have a JSON payload I need to pass to a third-party API that only accepts structures up to 3 levels deep — validate that this object meets that constraint before I send it."}],"resultDescription":"Returns a versioned deterministic JSON result containing the measured nesting depth, whether it is within the caller-supplied maximum, counts of nodes at each level, normalized values, and a versioned result contract — all computed in-memory without data retention.","failureModes":["JSON object exceeds maxProperties limit of 128 (input rejected)","maximum_depth not supplied or not a valid integer","malformed or non-object value input","payment not completed via x402 on Base (request blocked)","nesting depth computation timeout for extremely wide objects"],"whenToPreferThis":"Use this endpoint when an agent needs to programmatically enforce or verify JSON nesting depth constraints before passing structured data or batch plans to downstream tools, APIs, or services that impose strict depth limits. It is ideal for agentic pipelines where self-validation of output shape is required prior to handoff, and where a lightweight, deterministic, versioned result is needed without spinning up a full schema validation framework.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T07:09:25.441Z","isFirstParty":false}