# RelayStation Base64 Encode/Decode

> RelayStation Base64 Encode/Decode is a paid API for AI agents from api.relaystation.ai, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Base64-encodes or decodes a string, returning the transformed result instantly at a per-MB rate.

## Facts

- Endpoint: POST https://api.relaystation.ai/v1/utils/base64
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/relaystation-base64-encode-decode-b1eca4f4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_c9flBIt_7Gl2jzN1eSFKB

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 relaystation-base64-encode-decode-b1eca4f4 -d '<json body>'
```

Example prompt: Can you base64-encode this string for me: 'Hello, World! This is my API payload' — I need the encoded result to embed in a JSON request body.

## When to prefer this

Choose this endpoint when you need a reliable, metered, no-setup base64 encode/decode operation within an agentic workflow that already uses x402 micropayment infrastructure. Ideal for one-off conversions where spinning up a local utility is unnecessary or unavailable in the execution environment. The per-MB pricing makes it cost-effective for small strings (typical API payloads).

## Known failure modes

- Invalid base64 input when decoding (malformed characters or incorrect padding) — returns an error response
- Oversized payload exceeding size limits — may return a payload-too-large error
- Missing or malformed request body — returns a 400-level error
- Payment/x402 failure if insufficient USDC balance — call is rejected before processing

## How this service works

$0.0002/MB. Base64 encode or decode a string — simple, bounded, fast. 1¢ x402 min; remainder auto-credits — relaystation.ai/penny

## Output

Returns the base64-encoded or base64-decoded version of the input string. The response is a simple, bounded text result — the transformed string — delivered synchronously with no side effects.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {
      "data": {
       "type": "string",
       "minLength": 1
      },
      "mode": {
       "enum": [
        "encode",
        "decode"
       ],
       "type": "string"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/relaystation-base64-encode-decode-b1eca4f4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.relaystation.ai](https://www.zero.xyz/host/api.relaystation.ai/llms.txt)
