Create image from template
craftmypdf_create_imageWRITE: uses the CraftMyPDF account's own quota (credits; a successful generation is a billable transaction, typically 1 credit per document, and every call counts even with identical data). Generate ONE image (JPEG or PNG) from a template and your JSON data. Returns a hosted file URL (never file bytes) that expires after expiration minutes. POST /create-image with export_type=json.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | The JSON object that fills the template's {{placeholders}}, e.g. {"invoice_number":"INV38379","total_amount":82542.56}. The whole request must stay under about 3.8 MB. | |
| version | No | Template version number (from craftmypdf_list_template_versions). Latest version when omitted. | |
| expiration | No | Minutes until the hosted file is deleted from CraftMyPDF's CDN, 1-10080 (default 60; the vendor default is 5). | |
| output_file | No | File name of the output (default output.jpg). | |
| output_type | No | Image type (default jpeg). | |
| template_id | Yes | CraftMyPDF template id, e.g. 05f77b2b18ad809a (from craftmypdf_list_templates). |