{"uid":"cap_p_dQSkBRLKr1G05o1kW1I","slug":"json-pretty-printer-api-07679e3d","name":"JSON Pretty Printer API","description":"Decision-grade security/due-diligence outcome reports ($20-$100) plus deterministic paid utilities ($0.001+) for software agents and automated workflows.","url":"https://api.bakhour.ca/json/pretty","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string"}}},"responseSchema":{"type":"json","example":{"formatted":"{\\n  \"a\": 1\\n}"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_PXfmUSBDUGMfd2eqsQ_fh","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Formats and pretty-prints raw JSON text into human-readable indented output","exampleAgentPrompt":"Can you pretty-print this JSON for me: {\"a\":1,\"b\":{\"c\":2,\"d\":[1,2,3]}}? I want it nicely indented so it's easy to read.","exampleUseCases":[{"title":"Debug minified API response","prompt":"I got this minified JSON back from an API call and can't read it — can you pretty-print it for me? Here it is: {\"user\":{\"id\":42,\"name\":\"Alice\",\"roles\":[\"admin\",\"editor\"]},\"status\":\"active\"}"},{"title":"Format config file for review","prompt":"I have this compact JSON config and need to share it with my team in a readable format. Can you format it with proper indentation? {\"host\":\"localhost\",\"port\":8080,\"debug\":false,\"db\":{\"url\":\"postgres://localhost/mydb\",\"pool\":5}}"},{"title":"Prettify JSON before logging","prompt":"Before I log this JSON payload to our monitoring system, can you pretty-print it so the logs are human-readable? The raw JSON is: {\"event\":\"purchase\",\"amount\":49.99,\"currency\":\"USD\",\"items\":[{\"id\":\"sku-001\",\"qty\":2}]}"}],"resultDescription":"Returns a JSON object with a 'formatted' field containing the input JSON text pretty-printed with standard 2-space indentation and newlines, making it human-readable.","failureModes":["Invalid or malformed JSON input — the API may return an error or unpredictable output if the text field is not valid JSON","Empty text field — may return an empty or error response","Non-JSON text submitted — the endpoint is designed for JSON strings so arbitrary text may not be formatted meaningfully","Payment failure — if the x402 micropayment of $0.002 USDC is not completed, the request will be rejected with a 402 status"],"whenToPreferThis":"Choose this endpoint when you need a simple, deterministic, pay-per-use JSON pretty-printer callable by an AI agent or automated workflow without managing your own formatting library. It is ideal for lightweight pipelines where spinning up a local JSON formatter is impractical, or when operating in a sandboxed environment that benefits from an external utility API. The x402 micropayment model means no subscription or API key management — just pay per call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:44:32.340Z","isFirstParty":false}