Product

URL to PDF API

Use URL mode when the page already lives on a public http(s) host and you need a PDF at request time. Private, loopback, and metadata hosts are rejected. For HTML you control, send html instead. For a screenshot, use POST /v1/images.

url must be public http(s). Private, loopback, and metadata hosts return url_not_allowed.

When to use it

Use URL mode when you already host the page and need capture at request time.

  • Public http/https URLs only
  • Private, localhost, metadata, and RFC1918 hosts are blocked
  • Same options as HTML mode

Operational model

Successful jobs debit wallet cents. Failed jobs and rate-limited requests are unbilled.

curl

Generate a PDF from a URL.

POST /v1/pdf
curl https://api.relaypdf.com/v1/pdf \
  -H "Authorization: Bearer pdf_live_..." \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com","response":"binary"}' \
  --output page.pdf