Appearance
API Reference
Endpoint
POST https://app.offloadpdf.com/api/v1/pdfRequest Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
html | string | Yes | HTML content to convert to PDF |
Request Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer token format: Bearer YOUR_API_TOKEN |
Content-Type | Yes | Must be application/json |
Accept | No | Use application/pdf to receive binary PDF instead of JSON |
Response Formats
JSON Response (default)
json
{
"pdf_content": "base64-encoded-pdf-string"
}Binary PDF Response
Set the Accept header to application/pdf to receive the PDF file directly instead of a JSON response.
HTTP Status Codes
| Code | Description |
|---|---|
| 200 | Success - PDF generated successfully |
| 401 | Unauthorized - Invalid or missing API token |
| 402 | Payment Required - No active subscription |
| 422 | Validation Error - Missing or invalid html field |
| 429 | Too Many Requests - Monthly quota exceeded |
| 500 | Server Error - Internal server error |