Render Flexible Creative to PNG
render_flexible_creativeFlatten a layered flexible-creative document into a final PNG (rendered from the SAME layout the editor shows) and upload it to the creatives library. Returns the rendered image URL, the library image id, and pixel dimensions.
INTERNAL SAVE-PATH TOOL — invoked by the backend when the user clicks Save in the editor; not part of the chat generation flow. Renders the doc's background + text/CTA/logo/image layers so the flat image is pixel-identical to the editor preview.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Optional library name for the rendered image. Omit it and one is derived from the doc as `<brand-domain>-<channel>-<width>x<height>.png`, which is normally what you want. Must end in a file extension. | |
| design | Yes | The layered creative document to flatten (canvas, background, layers, brand) — the same JSON the editor edits. | |
| upload_to_library | No | Push the rendered PNG to the creatives library. Default: true. | |
| archive_library_image_id | No | Optional. The library image id this save supersedes (the creative's previous render). Archived on the platform ONLY after the new upload succeeds, so re-saving an editable creative retires the old PNG instead of piling up dead library images. Never affects an ad already built from it. |