# Base64 Encode/Decode API

> Base64 Encode/Decode API is a paid API for AI agents from base64-codec.api.klymax402.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Encodes plain text or binary data to base64 format, or decodes base64 strings back to their original form

## Facts

- Endpoint: GET https://base64-codec.api.klymax402.com/api/encode
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base64-codec-api-klymax402-com-cb8d2556
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rgaPt4YPRKStg6C5U2DEB

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-codec-api-klymax402-com-cb8d2556
```

Example prompt: Can you base64 encode the string 'Hello, World!' for me? Also, can you decode this base64 string: 'SGVsbG8sIFdvcmxkIQ=='?

## When to prefer this

Use this endpoint when an AI agent needs a simple, low-cost, stateless base64 encode or decode operation without standing up local logic or depending on a general-purpose library. Ideal for lightweight agentic workflows where base64 transformation is a step in a larger pipeline.

## Known failure modes

- Invalid base64 string passed to decode action — malformed or padded incorrectly
- Missing 'data' parameter — returns error indicating required field
- Invalid 'action' value — only 'encode' or 'decode' are accepted
- Network timeout or service unavailability returning 5xx error
- Payment failure via x402 protocol returning 402 status

## How this service works

Encode or decode base64 data

## Output

Returns the base64-encoded or base64-decoded version of the input string, depending on whether the action was 'encode' or 'decode'.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "type": "string",
   "description": "The data to encode or decode"
  },
  "action": {
   "type": "string",
   "description": "Action: 'encode' or 'decode' (default: encode)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base64-codec-api-klymax402-com-cb8d2556/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from base64-codec.api.klymax402.com](https://www.zero.xyz/host/base64-codec.api.klymax402.com/llms.txt)
