# Base64/Base32/Base58/Hex/URI Encoder-Decoder

> Base64/Base32/Base58/Hex/URI Encoder-Decoder is a paid API for AI agents from x402-micro-pay.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-11-20).

Encodes or decodes text using Base64, Base32, Base58, Hex, or URI codecs, returning the transformed string and byte count.

## Facts

- Endpoint: POST https://x402-micro-pay.com/api/skills/base64?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base64-base32-base58-hex-uri-encoder-decoder-cc13de3e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VeRY73iVjgaOIgE3WSkO-

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-base32-base58-hex-uri-encoder-decoder-cc13de3e -d '<json body>'
```

Example prompt: Encode the text 'hello agent' to base64 using URL-safe mode.

## When to prefer this

Use this endpoint when you need a simple, no-account, pay-per-call encoding/decoding utility supporting Base64, Base32, Base58, Hex, or URI codecs. It is ideal for AI agents that need occasional encoding without setting up API keys or managing credentials, and that already support the x402 micropayment protocol on Base.

## Known failure modes

- Input text exceeds 400,000 character limit — request rejected
- Invalid codec value not in allowed enum — validation error
- Invalid mode value — request rejected
- HTTP 402 returned if payment not provided via x402 protocol
- Malformed JSON body — parse error

## How this service works

41 pay-per-call JSON APIs for AI agents. No account or API key: an unpaid POST returns HTTP 402, pay in USDC on Base with x402 v2, retry. Prices from $0.001 per call.

## Output

A JSON object with ok=true, the mode used (encode or decode), the codec applied, the output transformed string, the byte length of the input, and the url_safe setting.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "mode": {
   "enum": [
    "encode",
    "decode"
   ],
   "type": "string"
  },
  "text": {
   "type": "string",
   "maxLength": 400000
  },
  "codec": {
   "enum": [
    "base64",
    "base32",
    "base58",
    "hex",
    "uri"
   ],
   "type": "string",
   "default": "base64"
  },
  "url_safe": {
   "type": "boolean",
   "default": false
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "mode": "encode",
  "bytes": 11,
  "skill": "base64",
  "output": "aGVsbG8gYWdlbnQ=",
  "url_safe": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base64-base32-base58-hex-uri-encoder-decoder-cc13de3e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-micro-pay.com](https://www.zero.xyz/host/x402-micro-pay.com/llms.txt)
