# keyframe.set

> Adds or replaces a keyframe of one animated property of an item.

Source: https://alexgalhardo.github.io/vukem-video/docs/reference/commands/keyframe.set

Sets the value of x, y, scale, rotation, opacity or (clips and audio) volume at an absolute position inside the item, from its start to its end inclusive. When the property had no keyframe and at is after the start, its current static value becomes the first keyframe. The easing applies from this keyframe to the next. At most 100 keyframes per property.

## Arguments

| Argument | Type | Required | Description |
| --- | --- | --- | --- |
| `at` | `string` | yes | Absolute position inside the item, inclusive of its end. |
| `easing` | `linear`, `ease_in`, `ease_out`, `ease_in_out`, `hold` | no | From this keyframe to the next. Default linear. |
| `item_id` | `string` | yes |  |
| `property` | `x`, `y`, `scale`, `rotation`, `opacity`, `volume` | yes |  |
| `value` | `number` | yes | Valid for the property: scale above 0 up to 20, opacity 0 to 1, volume 0 to 4. |

## Example

As one operation of an `edit` batch (the `edit` tool of MCP, `vukem-video edit --ops`, or `POST /api/v1/projects/{id}/edit`):

```json
{
  "op": "keyframe.set",
  "args": {
    "at": "2s",
    "easing": "ease_out",
    "item_id": "itm_s6t7v8w9x0",
    "property": "scale",
    "value": 1.2
  }
}
```

## Errors

[`E_VALIDATION`](/docs/reference/error-codes#e_validation), [`E_INVALID_TIME`](/docs/reference/error-codes#e_invalid_time), [`E_NOT_FOUND`](/docs/reference/error-codes#e_not_found), [`E_TYPE_MISMATCH`](/docs/reference/error-codes#e_type_mismatch), [`E_LIMIT`](/docs/reference/error-codes#e_limit)

## Scope and phase

Scope `edit`, phase `alpha`. Run `vukem-video command:help keyframe.set` for the same description from the binary.
