API Reference

Programmatically generate PDFs using our simple REST API. All requests must include your API Key in the `Authorization` header.

Authorization: Bearer <YOUR_API_KEY>

Generate PDF (Binary)

Generates a PDF from a specified template and returns the file binary directly. Perfect for fast, ephemeral generation.

POST/api/v1/generate

Parameters

templateId
string
Required
The unique identifier of the template to use.
data
object
Optional
Key-value pairs to replace variables in the template.

Generate PDF (Link)

Generates a PDF, uploads it to storage, and returns a temporary signed URL.

POST/api/v1/generateUrl

Parameters

templateId
string
Required
The unique identifier of the template.
filename
string
Optional
Optional custom filename for the generated PDF.
data
object
Optional
Key-value pairs for template variables.

Request Body

{
  "templateId": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
  "filename": "invoice_december.pdf",
  "data": {
    "name": "John Doe"
  }
}

List Templates

Returns a list of all PDF templates available for the authenticated user.

GET/api/v1/templates

Get Template Schema (GET)

Returns the expected data schema for a specific template in strict JSON Schema format using a query parameter.

GET/api/v1/schema

Parameters

templateId
string
Required

Get Template Schema (POST)

Returns the expected data schema for a specific template in strict JSON Schema format using the request body.

POST/api/v1/schema

Parameters

templateId
string
Required

Get Usage Status

Returns current usage and quota information for the authenticated user.

GET/api/v1/usage/status