Create layers
create_layersAdd layers (frames, groups, text, rectangles, ellipses, lines, images from a URL, and vector paths from SVG path data) to a design, nested with children in one call. Frames with a flow arrange their children in a row or column, so build text stacks and button rows as flows instead of placing each line by hand. Returns the new layer ids; change them later with update_layers. Layout problems (overflow, overlap, text off the page) this call made or changed come back as layout_issues.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | No | Position among the parent's children (front-most last); end when omitted. | |
| intent | Yes | One short sentence: what you change and why. Kept in the design history. | |
| layers | No | ||
| page_id | Yes | The page to work on, as returned by create_design. | |
| preview | No | Also return a preview picture of the result. Use it only when you need to see the design (the finished build, visual fixes); leave it off for empty frames and structural steps. | |
| replace | No | A layer in `layers` whose `id` exists replaces that layer and its children in place, keeping the id. | |
| parent_id | No | Frame or group to add into; the scene when omitted. |