# item.trim

> Moves the start edge or the end edge of an item to a timeline position.

Source: https://alexgalhardo.github.io/vukem-video/docs/reference/commands/item.trim

Moves an edge to an absolute position and keeps the source range, the keyframes and the caption words consistent. The end edge is exclusive: it is the first frame after the item.

## Arguments

| Argument | Type | Required | Description |
| --- | --- | --- | --- |
| `edge` | `start`, `end` | yes |  |
| `item_id` | `string` | yes |  |
| `to` | `string` | yes | Absolute position of the edge; the end is exclusive. |

## 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": "item.trim",
  "args": {
    "edge": "start",
    "item_id": "itm_m1n2p3q4r5",
    "to": "97f"
  }
}
```

## 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_INVALID_STATE`](/docs/reference/error-codes#e_invalid_state), [`E_OUT_OF_SOURCE`](/docs/reference/error-codes#e_out_of_source), [`E_OVERLAP`](/docs/reference/error-codes#e_overlap)

## Scope and phase

Scope `edit`, phase `prototype`. Run `vukem-video command:help item.trim` for the same description from the binary.
