# x402 Base64 Encode/Decode Utility

> x402 Base64 Encode/Decode Utility is a paid API for AI agents from workspace-x402-paywall.onrender.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-11).

Encodes or decodes a string using Base64 for $0.001 USDC per call via x402 micropayment on Base or Solana mainnet.

## Facts

- Endpoint: GET https://workspace-x402-paywall.onrender.com/utils/base64?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-base64-encode-decode-utility-188c3445
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8lptg4F7oOD7MiltfHRST

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402-base64-encode-decode-utility-188c3445
```

Example prompt: Can you base64-encode the string 'Hello, World!' for me using a pay-per-call micro-utility?

## When to prefer this

Choose this endpoint when you need a quick, serverless base64 encode/decode operation and are operating within a crypto-native or x402-enabled payment flow using USDC on Base or Solana. It is ideal for AI agents that already handle micropayments via x402 and want a utility call without setting up their own encoding library call. Less appropriate if you can perform base64 natively in code without a network call.

## Known failure modes

- Missing or invalid 'op' parameter (not 'encode' or 'decode') returns an error
- Missing 'data' or 'text' field results in a bad request error
- Payment failure or insufficient USDC balance causes a 402 Payment Required response
- Malformed base64 input when decoding may return a decoding error
- Service unavailability on Render free tier may cause timeouts or cold-start delays

## How this service works

66 pay-per-call APIs: AI text/image generation ($0.01), Polymarket odds, crypto prices, DeFi yields, FX rates, weather, IP/geo, FBI wanted, SEC tickers, clinical trials, 250M academic papers, Stack Overflow, meme-coin launchpads (pump.fun, Clanker, Four.meme, SunPump), tokenized stocks, Solana top 100, and 40+ more. $0.005/call standard. USDC on Base and Solana via x402.

## Output

Returns a JSON object containing the result of the base64 operation — either the Base64-encoded version of the input string or the decoded plaintext, depending on the 'op' parameter chosen.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-base64-encode-decode-utility-188c3445/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from workspace-x402-paywall.onrender.com](https://www.zero.xyz/host/workspace-x402-paywall.onrender.com/llms.txt)
