Skip to content

API Reference

Endpoint

POST https://app.offloadpdf.com/api/v1/pdf

Request Parameters

ParameterTypeRequiredDescription
htmlstringYesHTML content to convert to PDF

Request Headers

HeaderRequiredDescription
AuthorizationYesBearer token format: Bearer YOUR_API_TOKEN
Content-TypeYesMust be application/json
AcceptNoUse 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

CodeDescription
200Success - PDF generated successfully
401Unauthorized - Invalid or missing API token
402Payment Required - No active subscription
422Validation Error - Missing or invalid html field
429Too Many Requests - Monthly quota exceeded
500Server Error - Internal server error