---
title: "HTML to PDF (x402)"
method: GET
path: "/x402/v2/html-to-pdf"
tags: ["x402"]
---

# HTML to PDF (x402)

`GET /x402/v2/html-to-pdf`

## Request

- Base URL: `https://api.strale.io`
- URL: `https://api.strale.io/x402/v2/html-to-pdf`
- Auth: none required

Convert HTML string or URL to PDF via headless browser. Configurable paper size, margins, landscape mode. Returns base64 PDF.

## Query parameters

- `url` string: URL to convert
- `html` string: HTML string to convert
- `margins` object
- `landscape` boolean
- `paper_size` string

## Response `200`

Success

- object
  - `base64_pdf` string
  - `paper_size` 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)
