Add keyframe
add_keyframeAdd or overwrite a keyframe on a layer's animation track. For leaves (image/video/shape), x/y/rotation keyframes are ABSOLUTE canvas-space values: x and y are the layer centre's pixel position (canvas is 1080×1920), rotation is degrees. For groups, x/y keyframes are translation offsets applied around the group's frozen pivot, and rotation is the group's absolute angle. scale orbits the layer/pivot centre (1 = no change). opacity is 0..1. 30 fps. When a keyframe track is present on a property, it OVERRIDES the layer's static base value at every frame.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| frame | Yes | Frame number, 0-indexed. 30 fps so frame 30 = 1 second. | |
| value | Yes | Track value at this frame. | |
| easing | No | Interpolation to the next keyframe. Default linear. | |
| property | Yes | ||
| elementId | Yes | Layer id (video.<id>, image.<id>, shapes.<id>, or group.<id>). | |
| 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. |