# caption.edit_word

> Changes the text of one word of a caption, or removes the word.

Source: https://alexgalhardo.github.io/vukem-video/docs/reference/commands/caption.edit_word/

Replaces the text of the word at index; timing is untouched. An empty text removes the word and leaves a gap. The only word of a caption cannot be removed.

## Arguments

| Argument | Type | Required | Description |
| --- | --- | --- | --- |
| `index` | `integer` | yes | 0-based index of the word. min 0 |
| `item_id` | `string` | yes | A caption. |
| `text` | `string` | yes | The new text, 0 to 80 characters, no whitespace; empty removes. |

## 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": "caption.edit_word",
  "args": {
    "index": 3,
    "item_id": "itm_s6t7v8w9x0",
    "text": "editor"
  }
}
```

## Errors

[`E_VALIDATION`](/docs/reference/error-codes#e_validation), [`E_NOT_FOUND`](/docs/reference/error-codes#e_not_found), [`E_TYPE_MISMATCH`](/docs/reference/error-codes#e_type_mismatch), [`E_INVALID_STATE`](/docs/reference/error-codes#e_invalid_state)

## Scope and phase

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