Add image layer
add_image_layerAdd an image layer. The image must already be uploaded: upload_image takes a web URL or a file attached in the chat, and a file from the person's disk is uploaded in the editor. Every upload returns { filename, name, width, height }: pass filename (the stored file's id) here, and name as the layer's label. SIZE THE BOX TO THE PICTURE: pass width alone (or height alone) and the other side is filled from the image's own aspect, so the picture is never stretched; a box with both sides that does not match the image's aspect stretches the picture to fill it. To duplicate an existing layer, reuse its filename — the editor auto-assigns a fresh id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | Centre x in 1080-wide base coords. | |
| y | Yes | Centre y in 1920-tall base coords. | |
| name | No | Optional label people see in the Inspector and Timeline: pass the upload's returned `name`. Without it the layer is labelled by an older project's own filename, or by kind; never by a stored id. | |
| block | No | OPTIONAL timeline window — {start, duration} in composition frames. OMIT IT (the default) and the layer is ALWAYS PRESENT: a persistent overlay that holds for the whole composition, which is what an agent-placed watermark / lower-third almost always wants. Pass it to place a bounded CLIP instead (what the editor's own add does: 5 s at the playhead). Keyframes on a blocked layer are sampled RELATIVE to `start`. | |
| width | No | Width in px (> 0). Omit it to derive it from `height` and the image's aspect. | |
| height | No | Height in px (> 0). Omit it to derive it from `width` and the image's aspect; the usual call passes `width` alone. | |
| filename | Yes | The stored filename an upload returned (an id such as 3f2a9c1e-….png, or an older project's own name). | |
| projectId | Yes | Opaque project id (a v4 UUID, from list_projects/create_project). Selects which existing project this call mutates. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the call succeeded. | |
| data | No | The payload, shaped by the tool. | |
| note | No | What to do next when not ready. | |
| error | No | Why it failed. | |
| status | No | For cache-backed readers: whether the answer was ready. | |
| editorUrl | No | Opens this project in the editor. |