# Base64URL Encode

> Base64URL Encode is a paid API for AI agents from x402-agent.kariguetoazul.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-13).

Encodes a plain text string into Base64URL format (URL-safe Base64 without padding)

## Facts

- Endpoint: POST https://x402-agent.kariguetoazul.workers.dev/api/encoding/base64url-encode?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base64url-encode-4fa16f1e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kQtE60yDcLfoxELAafzwM

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 base64url-encode-4fa16f1e -d '<json body>'
```

Example prompt: Encode the text 'Hello, world!' into Base64URL format for me.

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call Base64URL encoding operation without setting up a local library or running code. Ideal for agents that need URL-safe encoding of tokens, JWT segments, or binary-safe text within a workflow that already uses x402 micropayment infrastructure. Not needed if you have local Base64URL encoding available.

## Known failure modes

- Input text exceeds 4096 character limit — request rejected
- Empty or missing 'text' field — returns an error or empty encoded string
- Malformed JSON request body — HTTP 400 bad request
- Payment not provided or insufficient — HTTP 402 payment required
- Service unavailable due to Cloudflare Worker quota limits

## How this service works

Evidence-backed autonomous AI jobs and paid data tools. Queue/D1/cron run outside the chat; free quotas and bounded execution apply.

## Output

Returns a JSON object with a single field 'encoded' containing the Base64URL-encoded string (URL-safe Base64, typically without padding characters), e.g. {"encoded": "SGVsbG8gd29ybGQ"}.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "maxLength": 4096,
   "description": "Text to process."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "encoded": "SGVsbG8gd29ybGQ"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base64url-encode-4fa16f1e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-agent.kariguetoazul.workers.dev](https://www.zero.xyz/host/x402-agent.kariguetoazul.workers.dev/llms.txt)
