# Strale API — Base64 Encode URL

> Strale API — Base64 Encode URL is a paid API for AI agents from api.strale.io, paid per call via x402, $0.0216/call, status unknown (last checked 2026-09-15).

Fetches a URL via GET and returns its content encoded as a Base64 string, with a cryptographic audit record.

## Facts

- Endpoint: GET https://api.strale.io/x402/v2/base64-encode-url
- Price: $0.0216/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/strale-api-base64-encode-url-c69a6b1d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dUHp2yN9qLFHnGpSSrXQ_

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 strale-api-base64-encode-url-c69a6b1d
```

Example prompt: Fetch the content at https://example.com/logo.png and give me the Base64-encoded version of it.

## When to prefer this

Choose this endpoint when you need to fetch arbitrary web content and receive it as a Base64-encoded string in one step, especially when an audit trail with cryptographic chain hashing is required for compliance or trust purposes. Prefer it over rolling your own fetch-and-encode logic when you need tamper-evident provenance records alongside the encoded output.

## Known failure modes

- Target URL is unreachable or returns a non-200 status — fetch fails and an error is returned
- URL is malformed or missing — request rejected with a validation error
- Target server blocks the fetcher's IP — content cannot be retrieved
- Response body is too large — may time out or be truncated
- URL points to a redirect loop — fetch may fail or return unexpected content

## How this service works

Fetch a URL and return content as base64. Useful for embedding images, PDFs in API calls. Returns base64, content type, data URI.

## Output

A Base64-encoded string representing the full body content fetched from the provided URL, along with a Strale audit record containing a cryptographic chain hash for provenance verification.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "url"
 ],
 "properties": {
  "url": {
   "type": "string",
   "description": "URL to fetch and encode"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "base64": {
  "type": "string"
 },
 "data_uri": {
  "type": "string"
 },
 "size_bytes": {
  "type": "integer"
 },
 "content_type": {
  "type": "string"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/strale-api-base64-encode-url-c69a6b1d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.strale.io](https://www.zero.xyz/host/api.strale.io/llms.txt)
