# Base64 Encode/Decode API

> Base64 Encode/Decode API is a paid API for AI agents from compute-api-production-245d.up.railway.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-29).

Encodes or decodes strings using Base64 encoding via a paid HTTP endpoint

## Facts

- Endpoint: POST https://compute-api-production-245d.up.railway.app/base64?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base64-encode-decode-api-c57fe1ba
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ra9irwAfZ1p5A76-oJDSd

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-encode-decode-api-c57fe1ba -d '<json body>'
```

Example prompt: Can you base64 encode the string 'Hello, World!' for me?

## When to prefer this

Choose this endpoint when you need a quick, reliable Base64 encode/decode operation as part of an automated agent workflow and are already integrated with the x402 micropayment protocol on Base. It is particularly useful when you need a hosted, stateless conversion without running your own compute, and when $0.001 USDC per call is acceptable. Prefer a local library instead if you need to avoid network latency or payment overhead for high-volume encoding tasks.

## Known failure modes

- Missing required 'input' field returns a 400-level error
- Invalid body type (not json/form-data/text) causes request rejection
- Malformed Base64 input during decode may return an error or garbled output
- Network timeout or Railway platform downtime returns 5xx
- Insufficient USDC balance causes x402 payment failure, blocking the request

## How this service works

Base64 encode/decode

## Output

Returns the Base64-encoded or decoded version of the input string, depending on the operation specified in the request body.

## 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": {
     "properties": {}
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "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/base64-encode-decode-api-c57fe1ba/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from compute-api-production-245d.up.railway.app](https://www.zero.xyz/host/compute-api-production-245d.up.railway.app/llms.txt)
