# Function: showBackground() (/jsdoc/pixi-vn-ai/index/functions/showBackground)



\> **showBackground**(`alias`, `request`, `options?`): `Promise`\<[`AIImageSprite`](/jsdoc/pixi-vn-ai/index/classes/AIImageSprite)\<[`AIImageSpriteMemory`](/jsdoc/pixi-vn-ai/index/interfaces/AIImageSpriteMemory)>>

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

Generate a background image and show it on the canvas, filling it edge-to-edge. This is the
combination of `ai.image.generateBackground` and Pixi'VN's `showImage`, using
[AIImageSprite](/jsdoc/pixi-vn-ai/index/classes/AIImageSprite) so the generated image itself is saved with the game and can be restored
on load without generating it again.

## Parameters [#parameters]

### alias [#alias]

`string`

The unique alias of the background. You can use this alias to refer to it later
(e.g. to replace it with another generated background).

### request [#request]

`string`

Natural language description of the background to generate.

### options? [#options]

[`BackgroundImageGenerateOptions`](/jsdoc/pixi-vn-ai/index/interfaces/BackgroundImageGenerateOptions)

Options controlling which context gets included in the prompt.

## Returns [#returns]

`Promise`\<[`AIImageSprite`](/jsdoc/pixi-vn-ai/index/classes/AIImageSprite)\<[`AIImageSpriteMemory`](/jsdoc/pixi-vn-ai/index/interfaces/AIImageSpriteMemory)>>

The [AIImageSprite](/jsdoc/pixi-vn-ai/index/classes/AIImageSprite) added to the canvas.
