{"uid":"cap_v-16ToEwatvzzTmm6NM0a","slug":"agent-data-bench-base64-encode-decode-753881d2","name":"Agent Data Bench Base64 Encode/Decode","description":"Encode UTF-8 text to base64 or decode base64 back to UTF-8, with byte counts. Lets an agent move binary-ish payloads through JSON without shipping a codec.","url":"https://x402.deepsense.stream/api/v1/base64?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"input":{"type":"string","maxLength":500000},"action":{"enum":["encode","decode"],"type":"string","default":"encode"}}},"responseSchema":null,"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_qjMZEbMxwLAylDnOfoNVq","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":"Encodes UTF-8 text to base64 or decodes base64 back to UTF-8, returning byte counts alongside the result.","exampleAgentPrompt":"Can you base64-encode this text for me so I can safely embed it in a JSON payload: 'Hello, World! This is my message.'","exampleUseCases":[{"title":"Encode API credentials for transport","prompt":"I need to base64-encode this string so I can include it in an Authorization header: 'myusername:mysecretpassword' — can you encode it?"},{"title":"Decode a base64 JWT payload","prompt":"I got this base64 chunk from a JWT payload and I need to read what's inside it: 'eyJ1c2VySWQiOiIxMjMiLCJyb2xlIjoiYWRtaW4ifQ==' — decode it to UTF-8 please."},{"title":"Embed binary blob in JSON safely","prompt":"I have this raw text data I need to ship through a JSON API that doesn't handle special characters well — encode it to base64 for me: '<?xml version=\"1.0\"?><root>data & more</root>'"}],"resultDescription":"Returns the base64-encoded or UTF-8-decoded string along with input and output byte counts, allowing the agent to verify data size and integrity without needing a local codec.","failureModes":["Invalid base64 input when action=decode causes a decoding error response","Input string exceeding 500,000 character limit returns a validation error","Malformed request missing the 'input' field returns a 400-level error","Payment failure (x402) returns a 402 Payment Required before processing"],"whenToPreferThis":"Choose this endpoint when an agent needs to encode or decode base64 in a JSON-safe way without relying on a local runtime library — especially useful in sandboxed or tool-calling contexts where standard codecs aren't available. Prefer this over rolling a custom solution when byte count metadata is also needed.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T12:34:16.924Z","isFirstParty":false,"canonicalSlug":"agent-data-bench-base64-encode-decode-753881d2"}