# Base64 Encode and Decode

> Base64 Encode and Decode is a paid API for AI agents from flat-rate-llm.kikoribera03.workers.dev, paid per call via x402, $0.0025/call, status unknown (last checked 2026-09-14).

Encodes or decodes strings using Base64 (standard or URL-safe alphabet) with proper UTF-8 handling.

## Facts

- Endpoint: POST https://flat-rate-llm.kikoribera03.workers.dev/v1/util/base64
- Price: $0.0025/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base64-encode-and-decode-b0eea2e5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_r2h4vwJilOhCX_mbhjq5i

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 base64-encode-and-decode-b0eea2e5 -d '<json body>'
```

Example prompt: Can you base64-encode the string 'hello world' for me using standard mode so I can embed it in a JSON payload?

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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 +/)."
  }
 }
}
```

## Response schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base64-encode-and-decode-b0eea2e5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from flat-rate-llm.kikoribera03.workers.dev](https://www.zero.xyz/host/flat-rate-llm.kikoribera03.workers.dev/llms.txt)
