Quickstart

Start rendering HTML and URL to PDF or image in minutes.

Quickstart

Use the API endpoints below:

  • POST /api/pdf for PDF output
  • POST /api/image for PNG/JPG output

URL to PDF

curl -X POST "https://snaphtml.one/api/pdf" \
  -H "content-type: application/json" \
  -d '{"url":"https://example.com"}' \
  --output out.pdf

HTML to PNG

curl -X POST "https://snaphtml.one/api/image" \
  -H "content-type: application/json" \
  -d '{"html":"<html><body><h1>Hello</h1></body></html>","type":"png"}' \
  --output out.png