Base64 encode and decode
util_base64Use when an agent must put bytes through a header, a URL or a JSON field, or read what came back: base64 in both directions, including the URL-safe alphabet, with UTF-8 handled properly. x402 itself rides on base64, so this is the one that reads a payment header. Do not use for hashing (/v1/util/sha256) or for hex (/v1/util/hex). No API key, no account. $0.005 per call, paid over x402 (USDC).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | encode | decode. Defaults to encode. | |
| input | Yes | The text or base64 to convert. | |
| urlSafe | No | Use the URL-safe alphabet (-_ instead of +/). |