# AIGatewayApplyOptions

typedef

<a id="properties">

## Properties

<a id="member-aiSource">

### `aiSource?: AIOperationSource`

AI source identifier stamped on every operation produced for this run.

Defaults to `'api'`.

Note that when `applyMethod` is `'suggest'`, every created suggestion also receives the `@ai` [attribute](module_track-changes_suggestion-Suggestion.md#member-attributes) with the same identifier. The track changes plugin uses this attribute to display the suggestion as AI-generated.

<a id="member-applyMethod">

### `applyMethod: AIRunApplyMethod`

How AI run changes are applied to the editor content.

With `'insert'` the changes are written directly into the editor content. With `'suggest'` they are wrapped as track-changes suggestions — this requires the `TrackChanges` plugin to be loaded on the editor.

<a id="member-roots">

### `roots?: Array<AIEditorRoot>`

Restrict the apply to a subset of the result's per-root entries. Each entry's `channelId` and `rootName` must match a per-root sub-result in the passed `AIRunResult`. When omitted, every entry in `result.results` is applied.

#### Value

`object`

---

Full index of the CKEditor 5 API reference: [llms.txt](llms.txt)
