Add an element to the current project
add_elementAdd a single element (video, image, text, shape, audio, group, caption, or particles) to an existing project. Optionally nest it inside a group using parent_id; the element is validated before being added.
Instructions
Append a single element to an existing project — a TWEAK, e.g. dropping in one more caption or shape. By default it is added at the top level; pass parent_id to add it INTO a group (nested). The element is any valid schema element: video, image, text, shape, audio, group, caption, or particles. To create a composition or add several elements at once, build the JSON and use set_project instead. The new element is validated as part of the project as a whole before being added. Call get_schema(element_type) for the exact per-type fields; unrecognized keys are flagged.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| element | Yes | A Clipkit element object. Must include `type`. | |
| parent_id | No | Optional id of a group to add this element INTO (nested). Omit to add at the top level. | |
| project_id | No | Which project to act on — the id returned by create_project / set_project / create_promo / load_project. Omit when working on a single local project. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| parent_id | No | ||
| element_type | No | ||
| added_element_id | No | ||
| top_level_element_count | Yes |