# Function: generateBackground() (/jsdoc/pixi-vn-ai/index/namespaces/ai/namespaces/image/functions/generateBackground)



\> **generateBackground**(`request`, `options?`): `Promise`\<`string`>

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

Generate a background image from a developer request, completely hiding prompt
engineering.

The image is meant to fill the whole game canvas: its size is read directly from
Pixi'VN and included in the prompt, so it never has to be passed manually.

## Parameters [#parameters]

### 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`\<`string`>

The generated image, as a data URI, ready to use directly as a Pixi'VN image
source.
