# capi2 Base64 Encode

> capi2 Base64 Encode is a paid API for AI agents from capi2-demand-tools.onrender.com, paid per call via x402, $0.0005/call, status unknown (last checked 2026-09-15).

Encodes UTF-8 text to Base64 format, returning the encoded string and byte count.

## Facts

- Endpoint: POST https://capi2-demand-tools.onrender.com/v1/base64/encode
- Price: $0.0005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/capi2-base64-encode-fa37ba1b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_SziwEEqR6hJ427AnVEyrd

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 capi2-base64-encode-fa37ba1b -d '<json body>'
```

Example prompt: Can you base64-encode the text 'hello agent' for me so I can embed it in an HTTP header?

## When to prefer this

Choose this endpoint when your agent needs a pay-per-call, stateless base64 encoding utility accessible over HTTP without managing a local library — especially useful in sandboxed agent environments where running native code is restricted or when integrating with x402 micropayment workflows.

## Known failure modes

- Empty or missing 'text' field returns a validation error (minLength:1 enforced)
- Non-UTF-8 or binary input may cause encoding errors
- Payment failure via x402 protocol prevents processing
- Service unavailability on Render free tier may cause cold-start latency or downtime

## How this service works

Paid x402 utilities and live intelligence for autonomous agents: hashing/encoding plus public web lookup, domain intelligence, API discovery audit, evidence extraction and x402 health.

## Output

Returns a JSON object with the base64-encoded string in the 'data' field, the encoding type ('base64') confirmed in 'encoding', and the number of input bytes in 'input_bytes'.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "minLength": 1,
   "description": "UTF-8 text to process."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": "aGVsbG8gYWdlbnQ=",
  "encoding": "base64",
  "input_bytes": 11
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/capi2-base64-encode-fa37ba1b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from capi2-demand-tools.onrender.com](https://www.zero.xyz/host/capi2-demand-tools.onrender.com/llms.txt)
