POST

Render URL to PDF

/v1/url-pdf

Powered by Playwright

Request → Response

Examples from schemas.json.

Requestapplication/json
POST /v1/url-pdf
Content-Type: application/json

{
  "url": "https://tools402.dev"
}
Responseapplication/json
HTTP/1.1 200 OK
Content-Type: application/json

// Endpoint-specific body after 402 settlement

Overview

Render URL to PDF via headless browser print. Uses playwright print.

Open-source browser automation and testing framework by Microsoft.

Request schema

Body: JSON · application/json

FieldTypeDescription
urlstringrequired
formatstringoptionalenum: A4, Letter, Legal, A3, A5
landscapebooleanoptional
printBackgroundbooleanoptional
viewportWidthintegeroptional
viewportHeightintegeroptional
IMPLEMENTATION
curl -X POST https://api.tools402.dev/v1/url-pdf \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://tools402.dev"
}'

402 payment flow omitted — see Integrations for settlement.