Add a keyframe
add_keyframeAdd or update a keyframe on an effect parameter at a specified time, with optional value and interpolation, enabling the parameter's animation stopwatch when needed.
Instructions
Add a keyframe to an effect parameter at a time, optionally with a value and interpolation; turns animation (the stopwatch) on if needed. If a keyframe already exists at that time its value is updated. Without value the keyframe takes the value the parameter currently has at that time. Times are sequence seconds by default (see time_base). A parameter that cannot be keyframed fails with UNSUPPORTED. Returns time, clip_source_time, value and keyframe_count. Use add_keyframes for several keyframes, and the dedicated tools (animate_clip_transform, fade_in_clip, add_volume_keyframes) for common animations.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"time": "<time>"
},
"name": "add_keyframe"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| time | Yes | Keyframe time, in seconds (see time_base). | |
| value | No | Value at the keyframe (number, boolean, [x, y] or string). Omit to keep the value the parameter has at that time. | |
| clip_id | No | Stable clip id (from get_sequence_structure / list_clips). Preferred. | |
| time_base | No | How times are measured. "sequence" (default): sequence time, seconds from the start of the timeline. "clip": clip source time, seconds from the start of the source media (the unit Premiere stores keyframes in). Times in the result use the same base. The sequence-to-source conversion ignores clip speed: on a speed-changed or reversed clip use "clip". | |
| clip_index | No | 0-based index of the clip in its track's clip list, as reported by list_clips / get_sequence_structure. Usually time order, but a moved clip can keep its old index, and indices shift after edits: prefer clip_id. | |
| param_name | No | Parameter display name, case-insensitive, e.g. "Blurriness". The first match is used. Ignored when param_index is given. | |
| track_type | No | Used with track_index + clip_index when clip_id is not given. Default "video". | |
| effect_name | No | Effect display name or match name, case-insensitive, e.g. "Gaussian Blur" or "Motion". The first match is used. Ignored when effect_index is given. | |
| param_index | No | 0-based parameter index (from get_effect_parameters). Required for parameters with an empty display name. | |
| sequence_id | No | Stable sequence id (from list_sequences). Omit to use the active sequence. | |
| track_index | No | 0-based track index (0 = V1 or A1). | |
| effect_index | No | 0-based index of the effect in the clip's effect list (from list_clip_effects). Use it when the clip has two effects with the same name. | |
| interpolation | No | Interpolation of the segment that starts at the keyframe: "linear", "hold" (value stays until the next keyframe), "ease_in" (fast start, slows into the next keyframe), "ease_out" (slow start, then faster), "ease_in_out" (slow at both ends) or "bezier" (marks the keyframe as Bezier; scripts cannot set its handles, so a keyframe that was linear keeps a straight segment: use the ease types for a curve). | |
| sequence_name | No | Sequence name; used only when sequence_id is not given. |