{"uid":"cap_r-SMAuj21DHDe-JXKcHIq","slug":"base64-encode-decode-utility-04d32d15","name":"Base64 Encode/Decode Utility","description":"Global current weather, hourly forecasts, foreign-exchange rates, EVM reads, and deterministic utilities for AI agents. Pay per call with MPP or x402; no API key.","url":"https://agent-chain-kit-solana.vercel.app/v1/base64?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["data"],"properties":{"data":{"type":"string"},"urlsafe":{"type":"boolean"},"operation":{"enum":["encode","decode"],"type":"string"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"bytes":5,"result":"aGVsbG8=","urlsafe":false,"operation":"encode"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0005","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.0005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_rOZhQD144NJ3b931hqHdL","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Encodes or decodes a string using Base64 (standard or URL-safe variant), returning the transformed result and byte count.","exampleAgentPrompt":"Can you base64 encode the string 'hello world' for me, using the standard (not URL-safe) format?","exampleUseCases":[{"title":"Encoding API credentials for auth header","prompt":"I need to base64 encode the string 'myuser:mypassword' so I can use it in a Basic Auth header — standard base64, not URL-safe."},{"title":"Decoding a base64 payload from an API response","prompt":"I got this base64 string back from an API: 'eyJzdWIiOiIxMjM0NTY3ODkwIn0=' — can you decode it to plain text for me?"},{"title":"Preparing URL-safe base64 for a web token","prompt":"Encode the string 'agent-token-xyz-123' as URL-safe base64 so I can safely embed it in a URL or JWT claim."}],"resultDescription":"Returns a JSON object containing the Base64-encoded or decoded result string, the number of bytes in the result, the operation performed (encode/decode), and whether URL-safe mode was used.","failureModes":["Missing required 'data' query parameter returns an error","Invalid operation enum value (not 'encode' or 'decode') causes a validation error","Malformed or non-base64 input when decoding may return an error or garbage output","Payment failure via MPP/x402 results in 402 status before processing occurs"],"whenToPreferThis":"Use this endpoint when you need a quick, keyless Base64 encode or decode operation within an agent workflow that already uses x402 micropayment infrastructure — especially useful when you want URL-safe vs standard base64 control and a byte count returned alongside the result.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-09T18:49:59.507Z","isFirstParty":false,"canonicalSlug":"base64-encode-decode-utility-04d32d15"}