# Base64 Encode/Decode

> Base64 Encode/Decode is a paid API for AI agents from conclavex402p04.pythonanywhere.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-14).

Encodes a plain string to Base64 or decodes a Base64 string back to plain text via a simple POST request.

## Facts

- Endpoint: POST https://conclavex402p04.pythonanywhere.com/u/base64?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base64-encode-decode-dc260a62
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dH1b7eOGD_cb4ZNO2TxgA

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-dc260a62 -d '<json body>'
```

Example prompt: Can you base64-encode the string 'Hello, World!' for me so I can embed it in a JSON payload?

## When to prefer this

Choose this endpoint when you need a quick, stateless base64 encode or decode operation within an x402 pay-per-call workflow, especially when already using other Conclave utility endpoints (e.g. hex encode, JWT decode) and want a consistent interface. Prefer it over local computation when operating in a sandboxed agent environment without native base64 libraries.

## Known failure modes

- Missing 'input' or 'mode' fields in the request body returns a 400 error
- Providing an invalid base64 string for decoding may return an error or garbled output
- Incorrect body structure (e.g. wrong bodyType) will result in a parsing failure
- Network or server timeout on pythonanywhere.com hosting may cause intermittent 5xx errors

## How this service works

Base64 encode or decode a string — base64 encoder/decoder (body {mode:encode|decode,input}).

## Output

Returns a JSON object with a single field: 'base64', containing either the base64-encoded version of the input string (when mode is 'encode') or the decoded plain-text string (when mode is 'decode').

## 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"
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "base64": "aGVsbG8="
 }
}
```

## More

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