{"uid":"cap_beS3H7LN0jBbc3_-2WrOf","slug":"x402-convert-json-yaml-converter-50949dc7","name":"x402-convert JSON↔YAML Converter","description":"Deterministic data-conversion API for AI agents. Pay-per-call in USDC on Base via x402 v2.","url":"https://x402-convert.arikanuk.workers.dev/json-yaml?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"json":{"description":"Any JSON value (JSON to YAML)"},"yaml":{"type":"string","description":"YAML text (YAML to JSON)"}}},"responseSchema":{"type":"json","example":{"yaml":"name: x402\ntags:\n  - a\n  - b\n"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_x7rst4uO-gc5dz0_VkD0s","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts JSON to YAML or YAML to JSON deterministically, billed per-call in USDC on Base via x402.","exampleAgentPrompt":"Convert this JSON object to YAML for me: {\"name\": \"x402\", \"tags\": [\"a\", \"b\"]}","exampleUseCases":[{"title":"Config file format migration","prompt":"I have a JSON config file I need in YAML — here it is: {\"server\": {\"host\": \"localhost\", \"port\": 8080}, \"debug\": true}. Can you convert it to YAML?"},{"title":"YAML pipeline output to JSON","prompt":"I got this YAML back from a CI pipeline and I need it as JSON so I can process it in my code: 'name: build\\nsteps:\\n  - checkout\\n  - test\\n'. Can you convert it?"},{"title":"API response reformatting","prompt":"The API returned this JSON and I need to store it as a YAML config: {\"database\": {\"url\": \"postgres://localhost/mydb\", \"pool\": 5}}. Convert it to YAML please."}],"resultDescription":"A JSON object containing either a 'yaml' field with the YAML-formatted string (when input is JSON) or a 'json' field with the parsed JSON value (when input is YAML).","failureModes":["Invalid or malformed YAML input returns an error response","Supplying both 'json' and 'yaml' fields simultaneously may cause ambiguous behavior","Empty input body or missing both fields returns an error","Payment failure via x402 (insufficient USDC balance or wrong network) prevents the call from executing","Extremely large payloads may hit Cloudflare Workers size limits"],"whenToPreferThis":"Choose this endpoint when you need a deterministic, pay-per-use JSON↔YAML conversion without setting up a local parser or dependency. Ideal for AI agents operating in serverless or sandboxed environments where installing libraries is not an option, and when you want a simple per-call micropayment model rather than a subscription.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:30:17.398Z","isFirstParty":false,"canonicalSlug":"x402-convert-json-yaml-converter-50949dc7"}