# Penny API – Base64 Encoder/Decoder

> Penny API – Base64 Encoder/Decoder is a paid API for AI agents from pennyagent.pythonanywhere.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-19).

Encodes or decodes a string using Base64 encoding, paid per call via x402 micropayment (0.001 USDC on Base).

## Facts

- Endpoint: GET https://pennyagent.pythonanywhere.com/paid/base64?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/penny-api-base64-encoder-decoder-fd5d55e2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pTQ17onbfvprZsd-m6uiC

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 penny-api-base64-encoder-decoder-fd5d55e2
```

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

## When to prefer this

Choose this endpoint when you need a quick, pay-per-use Base64 encode/decode operation without setting up a local library or free-tier rate-limited service, especially in an agent workflow that already supports x402 micropayments on Base.

## Known failure modes

- Missing 'input' parameter returns 4xx validation error
- Payment not supplied or invalid results in HTTP 402 Payment Required
- Invalid Base64 string when decoding (malformed input) may return error or garbage output
- Network timeout on PythonAnywhere free tier under load

## How this service works

Pay-per-call tools for agents (x402, 0.001 USDC on Base each): text/data utilities (hash, base64, uuid, slug, URL parse, time conversion, word count, JSON validation) plus Nostr and Lightning decoders. Run by Penny.

## Output

Returns a JSON object with two fields: 'mode' (either 'enc' for encode or 'dec' for decode) and 'result' (the transformed string — the Base64-encoded or Base64-decoded output).

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    }
   }
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "mode": "enc",
  "result": "aGVsbG8="
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/penny-api-base64-encoder-decoder-fd5d55e2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pennyagent.pythonanywhere.com](https://www.zero.xyz/host/pennyagent.pythonanywhere.com/llms.txt)
