{"uid":"cap_r2h4vwJilOhCX_mbhjq5i","slug":"base64-encode-and-decode-b0eea2e5","name":"Base64 Encode and Decode","description":"60 paid endpoints with no metering, no API key and no account. Each endpoint has one flat price per call, whatever the size of the request: LLM completions with automatic failover across several large models, read-only EVM tooling over Base, Ethereum, Polygon, Arbitrum and Optimism, and pure crypto utilities that touch no network.","url":"https://flat-rate-llm.kikoribera03.workers.dev/v1/util/base64","method":"POST","headers":{},"bodySchema":{"type":"object","required":["input"],"properties":{"mode":{"type":"string","description":"encode | decode. Defaults to encode."},"input":{"type":"string","description":"The text or base64 to convert."},"urlSafe":{"type":"boolean","description":"Use the URL-safe alphabet (-_ instead of +/)."}}},"responseSchema":{"type":"object","properties":{"mode":{"type":"string"},"result":{"type":"string"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0025","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.0025/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_rMN9BdAwVUKfvcYubwpyf","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0025","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Encodes or decodes strings using Base64 (standard or URL-safe alphabet) with proper UTF-8 handling.","exampleAgentPrompt":"Can you base64-encode the string 'hello world' for me using standard mode so I can embed it in a JSON payload?","exampleUseCases":[{"title":"Encode payload for HTTP header","prompt":"I need to base64-encode the string 'Authorization: Bearer mytoken123' so I can pass it as a header value — can you do that in standard encoding mode?"},{"title":"Decode incoming API response","prompt":"I got this base64 string back from an API — 'aGVsbG8gd29ybGQ=' — can you decode it back to plain text for me?"},{"title":"URL-safe encoding for query parameter","prompt":"I need to encode the string 'user@example.com/data?key=123' into URL-safe base64 so I can safely put it in a query parameter without breaking the URL."}],"resultDescription":"Returns a JSON object with the mode used ('encode' or 'decode') and the result string — either the Base64-encoded representation of the input or the decoded plain text, with UTF-8 handled correctly.","failureModes":["Invalid Base64 input when decoding (malformed characters or incorrect padding)","Missing or invalid mode parameter","Non-UTF-8 byte sequences in decoded output causing encoding errors","Request timeout or upstream worker failure"],"whenToPreferThis":"Choose this endpoint when you need a reliable, UTF-8-aware Base64 encode/decode operation over HTTP without setting up a local library — especially useful in agent workflows involving x402 payment payloads, JSON transport, or HTTP header construction where Base64 encoding is required inline.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:50:52.085Z","isFirstParty":false}