# Base64 Encoder and Decoder

> Base64 Encoder and Decoder is a paid API for AI agents from llmrt-companion.manhliemcn4euwlu.workers.dev, paid per call via x402, $0.000259/call, status unknown (last checked 2026-11-13).

Encodes UTF-8 text to Base64 or decodes Base64 back to UTF-8, supporting both standard and URL-safe alphabets, with byte-length reporting.

## Facts

- Endpoint: GET https://llmrt-companion.manhliemcn4euwlu.workers.dev/base64-402?utm_source=zero.xyz
- Price: $0.000259/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base64-encoder-and-decoder-2931e5af
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_whnA6FPnXjWE09uLOvP4t

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-encoder-and-decoder-2931e5af
```

Example prompt: Can you base64-encode the text 'Hello, World!' using the URL-safe alphabet and tell me how many bytes that input is?

## When to prefer this

Use this endpoint when you need a quick, stateless, no-credential Base64 encode or decode operation — especially when you need URL-safe alphabet support or byte-length metadata alongside the conversion. Ideal for agents that cannot run local code or need a reproducible, auditable micro-service call rather than relying on in-context string manipulation.

## Known failure modes

- Invalid base64 input on decode returns an error indicating malformed encoding
- Non-UTF-8 bytes in decoded output flagged as invalid UTF-8 rather than returned as garbled text
- Missing required 'text' query parameter results in a bad request error
- Unsupported action value returns an error indicating expected 'encode' or 'decode'

## How this service works

Base64 encode or decode any UTF-8 text in either the standard or the URL-safe alphabet. Reports the input byte length and, on decode, whether the bytes are valid UTF-8. Computed locally, no API key.

## Output

Returns the Base64-encoded or decoded string, the input byte length, and (on decode) a flag indicating whether the decoded bytes are valid UTF-8. Computed locally with no external dependencies.

## Request schema (JSON Schema)

```json
{
 "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": [
      "order_id"
     ],
     "properties": {
      "text": {
       "type": "string"
      },
      "action": {
       "type": "string"
      },
      "urlsafe": {
       "type": "string"
      },
      "order_id": {
       "type": "string"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base64-encoder-and-decoder-2931e5af/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from llmrt-companion.manhliemcn4euwlu.workers.dev](https://www.zero.xyz/host/llmrt-companion.manhliemcn4euwlu.workers.dev/llms.txt)
