Gives the keyframe at the absolute position a named easing (easing), a custom cubic Bezier curve (bezier: x1, y1, x2, y2; x1 and x2 from 0 to 1, y1 and y2 from -2 to 3) or a named Bezier preset (preset: in, out, in_out, back, overshoot, stored as its four numbers). Exactly one of the three. The value and the time of the keyframe do not change. Works for every animatable property, crop and mask included.
Arguments#
| Argument | Type | Required | Notes |
|---|---|---|---|
at | string | yes | Position of an existing keyframe on the project timeline. |
bezier | array of number | no | X1, y1, x2, y2 of a cubic Bezier curve: x1 and x2 from 0 to 1, y1 and y2 from -2 to 3.; at least 4 items; at most 4 items |
easing | linear, ease_in, ease_out, ease_in_out, hold | no | A named easing. Exactly one of easing, bezier and preset. |
item_id | string | yes | pattern ^itm_[0123456789abcdefghjkmnpqrstvwxyz]{10}$ |
preset | in, out, in_out, back, overshoot | no | A named Bezier curve, stored as its four numbers. |
property | string, one of 21 values | yes |
Errors#
Scope#
Scope edit. The scope is the one an API key needs in network mode. Run stuarty command:help keyframe.set_easing for the same description from the binary, or call the command_help tool.
Next steps#
As an MCP call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "edit",
"arguments": {
"project_id": "prj_7k2m9x4q1b",
"base_revision": 12,
"operations": [
{
"op": "keyframe.set_easing",
"args": {
"at": "1s",
"item_id": "itm_s6t7v8w9x0",
"preset": "overshoot",
"property": "scale"
}
}
]
}
}
}As a batch file for the CLI
[
{
"op": "keyframe.set_easing",
"args": {
"at": "1s",
"item_id": "itm_s6t7v8w9x0",
"preset": "overshoot",
"property": "scale"
}
}
]stuarty edit --project prj_7k2m9x4q1b --ops batch.json --jsonOver HTTP
curl -X POST "http://127.0.0.1:7878/api/v1/projects/prj_7k2m9x4q1b/edit" \
-H "Authorization: Bearer $STUARTY_KEY" \
-H "Content-Type: application/json" \
-d '{
"base_revision": 12,
"operations": [
{
"op": "keyframe.set_easing",
"args": {
"at": "1s",
"item_id": "itm_s6t7v8w9x0",
"preset": "overshoot",
"property": "scale"
}
}
]
}'The ids in the example are illustrative: read the real ones with project_get.