{"uid":"cap_6WTzqb28srXuv4xINt0fX","slug":"swift-bot-labs-toolbox-json-format-e488b91c","name":"Swift Bot Labs Toolbox – JSON Format","description":"62 small, deterministic utility APIs (DNS and e-mail checks, web extraction, EVM decoding, x402 checks, IP math, JSON/CSV, hashing, conversions). No account or API key: pay per call in USDC with x402.","url":"https://x402-toolbox.swiftbotlab.workers.dev/v1/json/format?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"json":{"type":"string","maxLength":524288,"description":"JSON text"},"mode":{"enum":["pretty","minify","canonical"],"type":"string","default":"pretty"},"indent":{"enum":[0,2,4,8],"type":"integer","default":2},"sortKeys":{"type":"boolean","default":false}}},"responseSchema":{"type":"json","example":{"ok":true,"tool":"json-format","result":{"bytes":27,"depth":3,"nodes":6,"valid":true,"result":"{\"a\":[1,2,{\"c\":null}],\"b\":1}"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_WwU5DTNQJMHLyPZuL-xEL","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Formats, minifies, or canonicalizes a JSON string and returns structural metadata (byte size, depth, node count, validity).","exampleAgentPrompt":"Can you pretty-print this JSON with 4-space indentation and sort the keys alphabetically: '{\"z\":1,\"a\":[1,2,{\"c\":null}],\"b\":true}'?","exampleUseCases":[{"title":"Validate and pretty-print API response","prompt":"I got this raw JSON back from an API call — can you check if it's valid and format it nicely with 2-space indentation so I can read it? Here it is: '{\"status\":\"ok\",\"data\":{\"id\":42,\"tags\":[\"a\",\"b\"]}}'"},{"title":"Minify JSON for deployment config","prompt":"Take this config JSON and minify it so I can embed it in an environment variable without whitespace: '{\"host\": \"localhost\", \"port\": 5432, \"ssl\": true}'"},{"title":"Canonical JSON for deterministic hashing","prompt":"I need a canonical form of this JSON with keys sorted so I can hash it consistently — please canonicalize '{\"z\":99,\"m\":\"hello\",\"a\":false}' for me."}],"resultDescription":"Returns a JSON object with ok=true, the tool name, and a result containing: the reformatted JSON string, its byte size, maximum nesting depth, total node count, and a boolean indicating whether the input was valid JSON.","failureModes":["Invalid JSON input returns ok=false or an error message","JSON text exceeding 524288 bytes is rejected","Unsupported mode or indent value causes a validation error","Payment failure via x402 blocks the request before processing"],"whenToPreferThis":"Choose this endpoint when you need a quick, stateless, pay-per-call JSON formatter with no account setup — especially when you also want structural metadata (depth, node count, byte size) alongside formatting. Ideal for agents that process JSON on-the-fly without a bundled utility library.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:40:25.319Z","isFirstParty":false,"canonicalSlug":"swift-bot-labs-toolbox-json-format-e488b91c"}