Skip to main content
Templates is a hosted Chromiumly feature. It is not available on self-hosted Gotenberg endpoints. To use templates, configure apiKey (or CHROMIUMLY_API_KEY). When only apiKey is set, Chromiumly uses https://api.chromiumly.dev.

Supported template types

  • invoice_freelancer
  • invoice_saas
  • invoice_classic
  • invoice_minimal
  • invoice_modern

Basic usage

Runtime validation

Pass { validate: true } as the second argument to validate the payload shape before the request:
If apiKey is missing, Templates.generate() throws.

Payload shape

invoice_saas, invoice_freelancer, invoice_minimal, and invoice_modern all use InvoiceSaasTemplateData; invoice_classic uses InvoiceClassicTemplateData, the only variant where companyLogo is required. The currency field accepts any ISO 4217 currency code exported as the Currency type (e.g. "USD", "EUR", "GBP").