{"uid":"cap_oPHAdx_mEHu1Sf4KsU_FU","slug":"agent402-uk-base64-encode-decode-a9ab543d","name":"Agent402 UK Base64 Encode/Decode","description":"Don't burn tokens on deterministic work. Go/no-go jobs first: payout preflight, text firewall (PII/secrets), budget check — then rails, calendars, finmath. x402 USDC on Base. UK + global. agent402.co.uk — not agent402.tools. $0.001–$0.002 USDC on Base. No API keys.","url":"https://agent402.co.uk/v1/utils/base64","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"Input text or base64 string"},"action":{"type":"string","description":"encode | decode"}}},"responseSchema":{"type":"json","example":{"text":"hello","action":"encode","encoded":"aGVsbG8="}},"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_8zyiExi9qmVYpsVsFF6Wk","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":"Deterministically encodes text to Base64 or decodes Base64 strings back to text, safe for headers, JWT fragments, and binary transport.","exampleAgentPrompt":"Base64-encode the string 'Authorization: Bearer my-secret-token' so I can safely include it in an HTTP header without padding errors.","exampleUseCases":[{"title":"JWT fragment decoding mid-task","prompt":"Can you decode this base64 JWT payload for me: eyJ1c2VySWQiOiAxMjM0LCAicm9sZSI6ICJhZG1pbiJ9 — I need to read what's inside without mangling any bytes."},{"title":"Encoding API credentials for auth headers","prompt":"I need to base64-encode the string 'myuser:mypassword' so I can put it in a Basic Authorization header — make sure the padding is correct."},{"title":"Decoding a base64 config value","prompt":"This config value came back as base64: aGVsbG8gd29ybGQ= — can you decode it back to plain text for me?"}],"resultDescription":"A JSON object containing the original input text, the action performed (encode or decode), and the resulting encoded or decoded string — e.g. {\"text\":\"hello\",\"action\":\"encode\",\"encoded\":\"aGVsbG8=\"}.","failureModes":["Invalid base64 string passed for decode action (malformed padding or illegal characters)","Missing required 'action' field returns an error","Missing required 'text' field returns an error","Non-UTF-8 binary content may not round-trip cleanly through the text field"],"whenToPreferThis":"Use this endpoint when an agent must not guess or hallucinate Base64 padding, especially mid-task with JWT fragments, HTTP Authorization headers, or binary-safe transport payloads. Prefer over LLM-generated Base64 for any production scenario where byte-perfect correctness is required. Priced at $0.001 USDC per call via x402 protocol.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:01:59.666Z","isFirstParty":false}