Skip to main content

When to use batches

Use the batch endpoint when you need to generate more than a handful of PDFs at once:
  • Monthly invoice runs
  • Bulk certificate generation
  • Report exports
  • Data migration (re-rendering documents)

Basic batch

Output modes

individual (default)

Each item produces its own PDF with its own URL:

merged

All items are combined into a single PDF in order:
Useful for: print-ready batch documents, combined monthly reports.

zip

All items are bundled into a downloadable ZIP:
Useful for: bulk downloads, email attachments.

Tracking progress

Batches are async. Poll or use webhooks:

Polling

Webhooks

Events:
  • batch.item.completed — fired for each item (useful for progress bars)
  • batch.completed — fired when all items are done
  • batch.failed — fired if the batch fails

Error handling

By default, a failed item doesn’t stop the batch. The batch completes with partial results:
Set stop_on_failure: true to abort remaining items on the first failure.

Concurrency

The parallel parameter controls how many items render simultaneously:
Higher parallelism = faster completion, but uses more of your concurrency quota. If your plan allows 20 concurrent renders and you set parallel: 20, the batch monopolizes your capacity — other API calls will queue.

Billing

Each completed item in a batch costs 1 credit. Failed items are free. A 50-item batch with 2 failures costs 48 credits.