# Base64 Encode/Decode

> Base64 Encode/Decode is a paid API for AI agents from tripguard-fare-intel.onrender.com, paid per call via x402, $0.12/call, status unknown (last checked 2026-10-11).

Encodes or decodes a string using Base64 (standard or URL-safe variant)

## Facts

- Endpoint: POST https://tripguard-fare-intel.onrender.com/base64?utm_source=zero.xyz
- Price: $0.12/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base64-encode-decode-56edac86
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_LORqHTizLf-ZsrXqqvkyj

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

Example prompt: Can you base64-encode the string 'hello world' for me using standard encoding?

## When to prefer this

Use this endpoint when you need a simple, stateless Base64 encode or decode operation without setting up a local library, especially in agent pipelines that already use x402/USDC micropayments on Base. The URL-safe flag makes it suitable for generating web-safe tokens. Note: the branding ('TripGuard Fare Intelligence') and pricing description are inconsistent with the actual /base64 endpoint functionality — this endpoint performs Base64 conversion only.

## Known failure modes

- Input string exceeds 65536 character limit — request rejected
- Invalid base64 input during decode — may return error or garbled output
- Missing or invalid mode enum value — request fails validation
- Non-UTF-8 binary input may not round-trip cleanly through the string field

## How this service works

Real-time airfare intelligence for AI travel-booking agents: flight price-drop prediction, fare-fraud and deal-legitimacy verification, and verified booking links for any route and date. Pay-per-call in USDC on Base. No API key.

## Output

Returns a JSON object with the mode used, the character count of the input in bytes, and the output string (Base64-encoded or decoded plaintext depending on mode selected).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "mode": {
   "enum": [
    "encode",
    "decode"
   ]
  },
  "input": {
   "type": "string",
   "maxLength": 65536
  },
  "urlsafe": {
   "type": "boolean"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "mode": "encode",
  "bytes": 11,
  "output": "aGVsbG8gd29ybGQ="
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base64-encode-decode-56edac86/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from tripguard-fare-intel.onrender.com](https://www.zero.xyz/host/tripguard-fare-intel.onrender.com/llms.txt)
