---
title: "Base64 Encode URL (x402)"
method: GET
path: "/x402/v2/base64-encode-url"
tags: ["x402"]
---

# Base64 Encode URL (x402)

`GET /x402/v2/base64-encode-url`

## Request

- Base URL: `https://api.strale.io`
- URL: `https://api.strale.io/x402/v2/base64-encode-url`
- Auth: none required

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

## Query parameters

- `url` string, required: URL to fetch and encode

## Response `200`

Success

- object
  - `base64` string
  - `data_uri` string
  - `size_bytes` integer
  - `content_type` string

## Other responses

- `402`: Payment required (x402 — pay with USDC on Base)

---

[API](https://skmtc.dev/strale/apis/strale-api-2.md) · [All operations](https://skmtc.dev/strale/apis/strale-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/strale/apis/strale-api-2/revisions/a5293878cfc6?raw)
