{"uid":"cap_StBW1qT_8AljQVkA_8tAM","slug":"json-root-type-c502413a","name":"JSON Root Type","description":"JSON root type and size. Use as a cheap preflight before heavier JSON processing. Returns root type (object/array/…) and a size signal. $0.001 USDC per successful call via x402 on Base—deterministic first-party JSON, no API key, no subscription, and nothing is billed on structured validation errors.","url":"https://api.delx.ai/api/v1/x402/json-type","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"json_text":{"type":"string","description":"Serialized JSON text to inspect or reformat."}}},"responseSchema":{"type":"json","example":{"size":2,"schema":"delx/json-type/v1","root_type":"dict"}},"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_2ef8HA4mZQzqjD7__U0WJ","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":"Inspects serialized JSON text and returns its root type (object, array, etc.) and a size signal as a cheap preflight check.","exampleAgentPrompt":"Before I run my heavy JSON pipeline on this blob, can you quickly check the root type and size of this JSON text: '{\"users\":[1,2,3],\"count\":3}'?","exampleUseCases":[{"title":"Pipeline preflight before heavy parsing","prompt":"I've got a large JSON blob and I want to confirm it's an array at the root before I send it to my expensive processing step — can you check the root type and size of this JSON: '[{\"id\":1},{\"id\":2}]'?"},{"title":"Routing JSON payloads by structure","prompt":"I need to route this incoming JSON to different handlers depending on whether it's an object or array — can you tell me the root type of '{\"event\":\"click\",\"user\":42}'?"},{"title":"Sanity check on API response before deserialization","prompt":"Before I deserialize this response from the third-party API, can you quickly inspect the root type and size of this JSON text: '{\"status\":\"ok\",\"data\":{}}'?"}],"resultDescription":"Returns the root type of the JSON (e.g. object, array, string, number, boolean, null) and a size signal indicating the scale of the payload, charged at $0.001 USDC per successful call; structured validation errors are not billed.","failureModes":["Malformed or unparseable JSON input returns a structured validation error (not billed)","Empty string input may return a validation error","Extremely large JSON strings may timeout or be rejected","Missing json_text field returns a validation error"],"whenToPreferThis":"Choose this endpoint when you need a fast, cheap preflight check on JSON structure before committing to heavier downstream processing. It is ideal for routing logic, pipeline guards, or any scenario where you need to know the root type and approximate size without full parsing. At $0.001 USDC with no subscription or API key required, it fits naturally into agentic pipelines that need lightweight JSON introspection.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T19:02:27.230Z","isFirstParty":false}