{"uid":"cap_mx-yrUMtxX7Pkxpq1dd3f","slug":"x-pay-base64-encode-4d158035","name":"X Pay Base64 Encode","description":"Pay-per-request utility APIs powered by x402 using USDC on Base.","url":"https://www.api-xpay.com/x402/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","bodyType","body"],"properties":{"body":{"type":"object"},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"queryParams":{"type":"object","additionalProperties":{"type":"string"}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"asset":"USDC","action":"encode","result":"aGVsbG8=","network":"base","success":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_L2MObp1uJczu7fqJUUxeW","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Encodes arbitrary data to Base64 format via a pay-per-request API using USDC on Base (x402 protocol).","exampleAgentPrompt":"Can you base64-encode this JSON payload for me: {\"hello\": \"world\"} — just send it as a POST with a JSON body and give me the encoded result?","exampleUseCases":[{"title":"Encode JSON payload for API auth","prompt":"I need to base64-encode this JSON object to include it in an Authorization header: {\"userId\": \"abc123\", \"role\": \"admin\"}. Can you encode it via POST with a JSON body?"},{"title":"Convert text string to base64","prompt":"Can you base64-encode the plain text string 'Hello, World!' for me? Send it as a POST with a text body type and return the encoded output."},{"title":"Encode form data for safe transport","prompt":"I have some form data I need to base64-encode before storing it — can you encode {\"name\": \"Alice\", \"email\": \"alice@example.com\"} using the form-data body type?"}],"resultDescription":"Returns a JSON object with fields: 'success' (boolean), 'result' (the base64-encoded string), 'action' (always 'encode'), 'asset' (USDC), and 'network' (base). On success, 'result' contains the full base64 representation of the submitted body.","failureModes":["Missing required 'input' field returns a validation error","Invalid 'method' value (not POST/PUT/PATCH) causes a 400-level error","Unsupported 'bodyType' enum value results in rejection","Payment failure or insufficient USDC balance causes a 402 Payment Required response","Empty or malformed body may return an empty or unexpected base64 result"],"whenToPreferThis":"Choose this endpoint when you need a simple, stateless base64 encoding utility accessible via API without setting up a local library, especially in agent pipelines where micro-payment per call (via x402/USDC on Base) is acceptable and convenience matters. Prefer it over self-hosted solutions when operating in an environment already integrated with the x402 payment protocol.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T03:19:49.605Z","isFirstParty":false,"canonicalSlug":"x-pay-base64-encode-4d158035"}