generate_document
Generate a PDF from a template by merging your data, then retrieve the download URL when processing completes. Optionally specify a workspace.
Instructions
Generate a PDF document from a template with provided data. This uses async generation with automatic polling until completion. Returns the download URL when ready. Optionally target a specific workspace with workspace_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ttl | No | Optional time-to-live for automatic deletion (e.g., "7d", "2h", "30m") | |
| meta | No | Optional additional metadata to store with the document | |
| payload | Yes | The data to merge into the template (must match template structure) | |
| filename | No | Optional filename for the generated PDF (e.g., "invoice-001.pdf") | |
| template_id | Yes | The ID of the template to use for generation | |
| workspace_id | No | Optional workspace (app) ID to generate the document in. When omitted, uses the default workspace. |