Convert HTML to PDF with a simple API call. Get started in minutes.
All API requests require an API key. Include it in the Authorization header:
Authorization: Bearer sf_pdf_your_api_key_here
https://pdf.siteforge.build/v1
Convert HTML to PDF.
| Field | Type | Description |
|---|---|---|
html | string | HTML content to convert (required if no url) |
url | string | URL to fetch and convert (required if no html) |
options | object | PDF options (optional) |
| Field | Type | Default | Description |
|---|---|---|---|
format | string | "Letter" | Page format: A4, Letter, Legal |
landscape | boolean | false | Landscape orientation |
margin | object | {} | Page margins: {top, bottom, left, right} |
filename | string | "document.pdf" | Downloaded filename |
curl -X POST https://pdf.siteforge.build/v1/convert \
-H "Authorization: Bearer sf_pdf_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"html": "<h1>Hello World</h1><p>This is my PDF.</p>",
"options": {
"format": "A4",
"margin": {
"top": "1in",
"bottom": "1in"
}
}
}' \
-o document.pdf
Returns the PDF file directly with Content-Type: application/pdf
Get your usage statistics for the current billing period.
curl https://pdf.siteforge.build/v1/usage \
-H "Authorization: Bearer sf_pdf_your_api_key"
{
"plan": "free",
"period": "2026-02",
"currentMonth": {
"conversions": 42,
"totalBytes": 15728640,
"avgProcessingMs": 1250,
"estimatedCost": "0.00"
},
"limits": {
"monthly": 100,
"remaining": 58
}
}
| Plan | Conversions/Month | Rate Limit |
|---|---|---|
| Free | 100 | 10/minute |
| Pay As You Go | Unlimited | 60/minute |
| Pro | 2,000 included | 120/minute |
| Code | Meaning |
|---|---|
| 400 | Bad request — check your input |
| 401 | Unauthorized — invalid or missing API key |
| 429 | Rate limit exceeded or monthly limit reached |
| 500 | Server error — try again or contact support |
Email us at [email protected]