{"uid":"cap_85WzWyIciyWQMpbwtRE6U","slug":"json-size-budget-7bd44e2d","name":"JSON Size Budget","description":"JSON Size Budget: JSON Size Budget measures compact UTF-8 JSON size against a byte budget from bounded caller-supplied values without an external provider. Call JSON Size Budget 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 Size Budget as versioned deterministic JSON. Price: $0.001 USDC via x402 on Base. First-pa…","url":"https://api.delx.ai/api/v1/x402/json-size-budget","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"value":{"type":"object","description":"Value supplied to JSON Size Budget; used only for this bounded calculation and processed in memory without retention.","maxProperties":128,"additionalProperties":true},"maximum_bytes":{"type":"integer","description":"Maximum Bytes supplied to JSON Size Budget; used only for this bounded calculation and processed in memory without retention."}}},"responseSchema":{"type":"json","example":{"result":{"bytes":19,"within_budget":true},"schema":"delx/util-json-size-budget/v1","status":"pass","evidence":{"retained":false,"input_sha256":"293a834474416653f334e4892f6eb0f0f2c98b11baddda224806b004dd8fbfba","external_calls":0},"operation":"data_batch:json_size_budget"}},"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_5YlR4T_z_v22uEWkNQ5aW","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 compact UTF-8 byte size of a JSON object against a caller-supplied byte budget and returns a pass/fail validation result with counts and normalized values","exampleAgentPrompt":"Can you check if this JSON object fits within a 512-byte budget? Here's the object: {\"user\":\"alice\",\"items\":[\"apple\",\"banana\"],\"total\":3}","exampleUseCases":[{"title":"Pre-flight payload size check","prompt":"Before I send this structured output to the downstream tool, check whether it fits within 2048 bytes — here's the JSON: {\"report\":{\"id\":\"r42\",\"lines\":[\"Line one\",\"Line two\",\"Line three\"],\"summary\":\"All clear\"}}"},{"title":"Agent batch plan size guard","prompt":"I'm about to hand this batch plan to a tool with a strict 1024-byte contract — can you measure it and tell me if it passes? The plan is {\"steps\":[{\"id\":1,\"action\":\"fetch\"},{\"id\":2,\"action\":\"transform\"},{\"id\":3,\"action\":\"store\"}]}"},{"title":"LLM output size constraint validation","prompt":"My downstream API only accepts responses under 256 bytes — check if this structured result passes: {\"status\":\"ok\",\"confidence\":0.91,\"label\":\"positive\"}"}],"resultDescription":"Returns a versioned deterministic JSON object containing the compact UTF-8 byte count of the serialized input, a pass/fail result against the specified maximum_bytes budget, normalized size values, and a versioned result contract identifier.","failureModes":["Input object exceeds maxProperties limit of 128 keys — validation error returned","maximum_bytes not provided — missing required parameter error","Value field not a valid JSON object — type validation failure","Extremely deeply nested objects may be rejected by property limits"],"whenToPreferThis":"Use this endpoint when an AI agent needs to verify that a structured JSON payload or batch plan fits within a downstream tool's strict byte-size contract before handoff, without relying on any external provider or runtime environment. Prefer it over manual size estimation when you need a deterministic, versioned, auditable result with normalized counts.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:30:15.599Z","isFirstParty":false}