# x402 Utility Tools – Base64 Codec

> x402 Utility Tools – Base64 Codec is a paid API for AI agents from x402-utils.558686.xyz, paid per call via x402, $0.0001/call, status unknown (last checked 2026-10-24).

Encodes or decodes text using Base64 via a lightweight, deterministic, pay-per-call API endpoint.

## Facts

- Endpoint: POST https://x402-utils.558686.xyz/v1/tools/base64-codec?utm_source=zero.xyz
- Price: $0.0001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-24
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-utility-tools-base64-codec-bb00389e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BLpEHwTzhuDNEt-TuLnSw

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-utility-tools-base64-codec-bb00389e -d '<json body>'
```

Example prompt: Base64-encode the text 'x402 tools are great' for me using encode mode.

## When to prefer this

Choose this endpoint when you need a cheap ($0.002 USDC), deterministic, repeatable Base64 encode/decode operation without spinning up an LLM or a full data pipeline. It is ideal for agents that need to prepare strings for HTTP headers, embed data in JSON, or decode opaque payloads as a preprocessing step before heavier operations.

## Known failure modes

- Invalid mode value (not 'encode' or 'decode') may result in an error or unexpected output
- Missing 'text' field returns an error response
- Malformed Base64 input in decode mode may return a decoding error
- Payment failure (402) if x402 micropayment is not properly attached
- Network timeout on the upstream host

## How this service works

A compact x402 utility surface for agents that need cheap, repeatable non-LLM transformations before spending on heavier routes: CSV cleanup, JSON Schema checks, timestamp conversion, JWT decode, URL normalization, hashes, codecs, and text utilities.

## Output

Returns a JSON object with ok=true, the tool name ('base64-codec'), the echoed input (mode and text), the route used, and a result object containing the mode applied, the byte length of the input, and the output string (encoded or decoded). The response is deterministic for the same input.

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "tool": "base64-codec",
  "input": {
   "mode": "encode",
   "text": "x402 tools"
  },
  "route": "/v1/tools/base64-codec",
  "result": {
   "mode": "mode_example",
   "bytes": 1,
   "output": "output_example"
  },
  "project": "x402-utility-tools",
  "deterministic": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-utility-tools-base64-codec-bb00389e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-utils.558686.xyz](https://www.zero.xyz/host/x402-utils.558686.xyz/llms.txt)
