# AgentTools Base64 Encode/Decode

> AgentTools Base64 Encode/Decode is a paid API for AI agents from agenttools-hub.vercel.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-02).

Encodes plain text to base64 or decodes base64 strings back to text, with full UTF-8 support including emoji and non-Latin scripts.

## Facts

- Endpoint: GET https://agenttools-hub.vercel.app/api/v1/dev/base64-encode?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agenttools-base64-encode-decode-ff59c9e4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hsfLxpvev6E4F5e4IP8Fh

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 agenttools-base64-encode-decode-ff59c9e4
```

Example prompt: Can you base64 encode this text for me: 'Hello, 世界! 🌍' — use the encode direction.

## When to prefer this

Choose this endpoint when you need a quick, reliable base64 encode or decode with explicit direction control and confirmed UTF-8/emoji support. Prefer it over rolling your own when operating in an agent context that needs a deterministic, hosted utility, or when encoding non-Latin scripts and emoji that may trip up naive implementations.

## Known failure modes

- Invalid base64 string passed when direction is 'decode' — may return error or garbled output
- Missing required 'text' query parameter — returns validation error
- Invalid 'direction' enum value (not 'encode' or 'decode') — returns 400 error
- Non-UTF-8 compatible binary data may not decode cleanly to readable text

## How this service works

Encode text to base64 or decode base64 back to text. Full UTF-8 support including emoji and non-Latin scripts. Use this when an agent needs to uTF-8 safe base64 in both directions.

## Output

Returns the transformed string — either the base64-encoded representation of the input text, or the original UTF-8 decoded text from a base64 input. The response includes the output string with full support for emoji and non-Latin characters.

## 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"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "Text"
      },
      "direction": {
       "enum": [
        "encode",
        "decode"
       ],
       "type": "string",
       "description": "Direction"
      }
     }
    }
   },
   "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/agenttools-base64-encode-decode-ff59c9e4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agenttools-hub.vercel.app](https://www.zero.xyz/host/agenttools-hub.vercel.app/llms.txt)
