# Interface: ElementImageGenerateOptions (/pixi-vn-ai/index/interfaces/ElementImageGenerateOptions)



Defined in: [src/types/ElementImageGenerateOptions.ts:11](https://github.com/DRincs-Productions/pixi-vn-ai/blob/f5205e28d51c043e8eeb27fcb2b61433f3751ac2/src/types/ElementImageGenerateOptions.ts#L11)

Options accepted by [ai.image.generateElement](/pixi-vn-ai/index/namespaces/ai/namespaces/image/functions/generateElement).

Generates a single visual element (e.g. a character) meant to be layered on top of other
visuals: the area behind the subject is transparent, and [align](#align) describes where it will
be positioned on screen so the model can compose it accordingly.

## Extends [#extends]

* [`ImageGenerateOptions`](/pixi-vn-ai/index/interfaces/ImageGenerateOptions)

## Properties [#properties]

### align? [#align]

\> `optional` **align?**: `object`

Defined in: [src/types/ElementImageGenerateOptions.ts:31](https://github.com/DRincs-Productions/pixi-vn-ai/blob/f5205e28d51c043e8eeb27fcb2b61433f3751ac2/src/types/ElementImageGenerateOptions.ts#L31)

Position of the element within the canvas (Pixi'VN's `align`, see
[https://pixi-vn.com/start/canvas-position](https://pixi-vn.com/start/canvas-position)). Each axis is a 0-1 fraction of the canvas'
width/height that is also used as the element's own anchor on that axis, so the value
describes both where on the canvas the point sits and which point of the element is placed
there: `0` = the element's left/top edge is flush against the canvas' left/top edge, `1` =
the element's right/bottom edge is flush against the canvas' right/bottom edge, `0.5` =
centered on that axis.

#### x [#x]

\> **x**: `number`

Horizontal position, as a 0-1 fraction of the canvas' width.

#### y [#y]

\> **y**: `number`

Vertical position, as a 0-1 fraction of the canvas' height.

***

### backgroundImage? [#backgroundimage]

\> `optional` **backgroundImage?**: `string` | `true`

Defined in: [src/types/ElementImageGenerateOptions.ts:21](https://github.com/DRincs-Productions/pixi-vn-ai/blob/f5205e28d51c043e8eeb27fcb2b61433f3751ac2/src/types/ElementImageGenerateOptions.ts#L21)

The background image this element will be placed over, so the model can compose the
subject coherently with what's behind it (lighting, perspective, scale, ...).

Pass `true` to use whatever is currently rendered on the game canvas instead of a specific
asset.

Forwarded to the provider as the reference image when [referenceImage](/pixi-vn-ai/index/interfaces/ImageGenerateOptions#referenceimage) isn't set.

***

### context? [#context]

\> `optional` **context?**: `string`

Defined in: [src/types/GenerateOptions.ts:19](https://github.com/DRincs-Productions/pixi-vn-ai/blob/f5205e28d51c043e8eeb27fcb2b61433f3751ac2/src/types/GenerateOptions.ts#L19)

Additional developer context, injected verbatim into the prompt.

#### Inherited from [#inherited-from]

[`ImageGenerateOptions`](/pixi-vn-ai/index/interfaces/ImageGenerateOptions).[`context`](/pixi-vn-ai/index/interfaces/ImageGenerateOptions#context)

***

### history? [#history]

\> `optional` **history?**: `boolean`

Defined in: [src/types/GenerateOptions.ts:15](https://github.com/DRincs-Productions/pixi-vn-ai/blob/f5205e28d51c043e8eeb27fcb2b61433f3751ac2/src/types/GenerateOptions.ts#L15)

Include the Pixi'VN narrative history.

When not false, the history is retrieved directly from Pixi'VN and serialized into JSON.

#### Default [#default]

```ts
true
```

#### Inherited from [#inherited-from-1]

[`ImageGenerateOptions`](/pixi-vn-ai/index/interfaces/ImageGenerateOptions).[`history`](/pixi-vn-ai/index/interfaces/ImageGenerateOptions#history)

***

### referenceImage? [#referenceimage]

\> `optional` **referenceImage?**: `string`

Defined in: [src/types/ImageGenerateOptions.ts:11](https://github.com/DRincs-Productions/pixi-vn-ai/blob/f5205e28d51c043e8eeb27fcb2b61433f3751ac2/src/types/ImageGenerateOptions.ts#L11)

Optional reference image, forwarded to providers that support image-to-image generation.

#### Inherited from [#inherited-from-2]

[`ImageGenerateOptions`](/pixi-vn-ai/index/interfaces/ImageGenerateOptions).[`referenceImage`](/pixi-vn-ai/index/interfaces/ImageGenerateOptions#referenceimage)

***

### scene? [#scene]

\> `optional` **scene?**: `string`

Defined in: [src/types/GenerateOptions.ts:23](https://github.com/DRincs-Productions/pixi-vn-ai/blob/f5205e28d51c043e8eeb27fcb2b61433f3751ac2/src/types/GenerateOptions.ts#L23)

Scene description.

#### Inherited from [#inherited-from-3]

[`ImageGenerateOptions`](/pixi-vn-ai/index/interfaces/ImageGenerateOptions).[`scene`](/pixi-vn-ai/index/interfaces/ImageGenerateOptions#scene)

***

### style? [#style]

\> `optional` **style?**: `string`

Defined in: [src/types/GenerateOptions.ts:27](https://github.com/DRincs-Productions/pixi-vn-ai/blob/f5205e28d51c043e8eeb27fcb2b61433f3751ac2/src/types/GenerateOptions.ts#L27)

Desired style (tone of voice, art style, etc).

#### Inherited from [#inherited-from-4]

[`ImageGenerateOptions`](/pixi-vn-ai/index/interfaces/ImageGenerateOptions).[`style`](/pixi-vn-ai/index/interfaces/ImageGenerateOptions#style)
