# text.add

> Adds a text item to a visual track.

Source: https://alexgalhardo.github.io/vukem-video/pt-br/docs/reference/commands/text.add

Adds a text item. The style is stored exactly as given, including keys equal to the default. x and y are the centre of the item in pixels; without them the item is centred.

## Arguments

| Argument | Type | Required | Description |
| --- | --- | --- | --- |
| `duration` | `string` | yes | A length of at least 1 frame. |
| `id` | `string` | no |  |
| `start` | `string` | yes | a time with a unit: "12.5s", "375f" or "00:00:12.500" |
| `style` | `object` | no | A partial TextStyle. |
| `text` | `string` | yes | The text; line breaks are allowed. |
| `track_id` | `string` | yes | A visual track. |
| `x` | `number` | no |  |
| `y` | `number` | no |  |

## 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": "text.add",
  "args": {
    "duration": "2s",
    "id": "itm_s6t7v8w9x0",
    "start": "0s",
    "style": {
      "size": 96
    },
    "text": "Hello",
    "track_id": "trk_f6g7h8j9k0"
  }
}
```

## 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_ID_EXISTS`](/docs/reference/error-codes#e_id_exists), [`E_LIMIT`](/docs/reference/error-codes#e_limit), [`E_FONT_UNKNOWN`](/docs/reference/error-codes#e_font_unknown), [`E_OVERLAP`](/docs/reference/error-codes#e_overlap)

## Scope and phase

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