Create a Template
create_templateSaves a reusable HTML/CSS image template for rendering multiple images with different values. Put Handlebars placeholders such as {{title}} in the HTML; substitutions are evaluated in HTML only. Returns item.template_id and item.template_version. Call create_templated_image with that ID and template_values to render an image. Use create_image for a single image from supplied HTML/CSS, or update_template to revise an existing template.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Template HTML, optional CSS, name, description, and rendering defaults. Choose a recognizable name for later list_templates calls. Use content.selector to crop to a specific element and give that element explicit dimensions for fixed-size images. For an exact browser viewport, set both viewport_width and viewport_height; this disables automatic cropping. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item | No | Operation result. Check success before using this value. | |
| error | No | Error details when the operation failed; null on success. | |
| success | No | Whether the operation succeeded. If false, inspect error before retrying. |