PDF generation API

A PDF generation API your pipeline can call

Design a template once, then POST JSON to render it. Workspace-scoped API keys, single and batch generation, and presigned download URLs.

generate.sh — bash
# render one invoice from a template
curl https://api.imaginepdf.com/api/v1/designs/inv_42/generate \
  -H "X-API-Key: pc_live_..." \
  -H "Content-Type: application/json" \
  -d @data.json

# → { "downloadUrl": "https://…/inv_42.pdf" }

ImaginePDF separates design from generation. You build a template — on the canvas or with Claude — then call the REST API with the data. JSON goes in, a finished PDF comes back as a presigned URL.

Keys are scoped to a workspace, not a person, so service accounts stay clean as your team changes. Generate one document synchronously, or submit a batch and poll it to completion.

What you get

JSON in, PDF out

POST values keyed by your template’s field names. The response is a presigned URL to the rendered PDF.

Workspace-scoped keys

Authenticate with X-API-Key. Keys belong to the workspace, so you can rotate them without breaking teammates.

Single or batch

One call for a document; one call for up to 100 rows — submit, poll, then download the zip.

Free previews

Render any page to a PNG to check layout before you spend a credit on the PDF.

How it works

  1. 1

    Create a design

    Build a template on the canvas or with Claude, and bind the fields that change per document.

  2. 2

    Grab a workspace API key

    Generate an X-API-Key for the workspace and keep it server-side.

  3. 3

    POST your data

    Call /generate for one PDF or /batch for many, then fetch the presigned download URL(s).

In code

batch.sh — bash
# up to 100 invoices from one file
curl https://api.imaginepdf.com/api/v1/designs/inv_42/batch \
  -H "X-API-Key: pc_live_..." \
  -H "Content-Type: application/json" \
  -d @rows.json

# → { "jobId": "job_…" }  · poll, then download the zip

What's supported — and what isn't

Supported

  • REST endpoints for designs, tree actions, image uploads, preview, single generate, and batch
  • Workspace-scoped authentication with X-API-Key (not personal tokens)
  • Presigned download URLs (1-hour expiry) and free PNG previews
  • Batch of 1–100 rows per job, async: submit → poll → download a zip

Current limitations

  • Batch generation is plan-gated; single API generation is available on the free plan
  • Up to 100 rows per batch job (chain jobs for larger runs)
  • Uploaded images up to 1 MB each; fonts from the built-in catalog

Frequently asked questions

How do I authenticate?
Send a workspace-scoped key in the X-API-Key header. Keys belong to the workspace, so rotating one never breaks an individual teammate.
Can I call it from any language?
Yes — it is a plain REST API over HTTPS, so any language or HTTP client works. POST JSON, receive a presigned PDF URL.
How big can a batch be?
Up to 100 rows per batch job. For larger runs, submit multiple jobs. Each job is async: submit, poll the status, then download the zip.
How is usage billed?
By credits — one credit per generated PDF or batch row. Previews are free, so you can validate layout without spending credits.
How do I track a batch?
Batch generation is asynchronous. Submit the rows, poll the returned job ID until it completes, then request the ZIP download URL.

Start generating PDFs free

Design on a visual canvas, let Claude draft it, or call the API — and generate one PDF or thousands. No watermark.