Base64 Encode/Decode

Base64-encode UTF-8 text or decode base64 back to text. Standard or URL-safe alphabet. Deterministic, no network. First-party on grokzilla.shop.

Call

POST /api/skills/base64

{ "mode": "encode", "text": "hello agent", "url_safe": false }

mode (required: "encode" or "decode"), text (required string, up to 400,000 characters), url_safe (optional boolean, default false: use - and _ instead of + and /).

Decoding ignores whitespace and accepts missing = padding. The decoded bytes must be UTF-8 text.

Errors (not charged)

Response (paid 200)

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

Unpaid → HTTP 402 (x402 USDC on Base). Retry with PAYMENT-SIGNATURE. Free preflight: send X-X402-Validate-Only: 1 (422 on bad params, else 402).

Price: $0.003 per call.