Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

ImageGenerationOptions.md

94 lines2.0 KB

1---
2id: ImageGenerationOptions
3title: ImageGenerationOptions
4---
5​
6# Interface: ImageGenerationOptions\<TProviderOptions, TSize\>
7​
8Defined in: [packages/typescript/ai/src/types.ts:1416](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1416)
9​
10Options for image generation.
11These are the common options supported across providers.
12​
13## Type Parameters
14​
15### TProviderOptions
16​
17`TProviderOptions` *extends* `object` = `object`
18​
19### TSize
20​
21`TSize` *extends* `string` \| `undefined` = `string`
22​
23## Properties
24​
25### logger
26​
27```ts
28logger: InternalLogger;
29```
30​
31Defined in: [packages/typescript/ai/src/types.ts:1434](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1434)
32​
33Internal logger threaded from the generateImage() entry point. Adapters must
34call logger.request() before the SDK call and logger.errors() in catch blocks.
35​
36***
37​
38### model
39​
40```ts
41model: string;
42```
43​
44Defined in: [packages/typescript/ai/src/types.ts:1421](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1421)
45​
46The model to use for image generation
47​
48***
49​
50### modelOptions?
51​
52```ts
53optional modelOptions: TProviderOptions;
54```
55​
56Defined in: [packages/typescript/ai/src/types.ts:1429](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1429)
57​
58Model-specific options for image generation
59​
60***
61​
62### numberOfImages?
63​
64```ts
65optional numberOfImages: number;
66```
67​
68Defined in: [packages/typescript/ai/src/types.ts:1425](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1425)
69​
70Number of images to generate (default: 1)
71​
72***
73​
74### prompt
75​
76```ts
77prompt: string;
78```
79​
80Defined in: [packages/typescript/ai/src/types.ts:1423](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1423)
81​
82Text description of the desired image(s)
83​
84***
85​
86### size?
87​
88```ts
89optional size: TSize;
90```
91​
92Defined in: [packages/typescript/ai/src/types.ts:1427](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1427)
93​
94Image size in WIDTHxHEIGHT format (e.g., "1024x1024")