Docs
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
Neon
WorkOS
Clerk
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
Neon
WorkOS
Clerk
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
Class References
Function References
Interface References
Type Alias References
Variable References

ImageGenerationOptions

Interface: ImageGenerationOptions<TProviderOptions, TSize>

Defined in: packages/typescript/ai/src/types.ts:1201

Options for image generation. These are the common options supported across providers.

Type Parameters

TProviderOptions

TProviderOptions extends object = object

TSize

TSize extends string = string

Properties

logger

ts
logger: InternalLogger;
logger: InternalLogger;

Defined in: packages/typescript/ai/src/types.ts:1219

Internal logger threaded from the generateImage() entry point. Adapters must call logger.request() before the SDK call and logger.errors() in catch blocks.


model

ts
model: string;
model: string;

Defined in: packages/typescript/ai/src/types.ts:1206

The model to use for image generation


modelOptions?

ts
optional modelOptions: TProviderOptions;
optional modelOptions: TProviderOptions;

Defined in: packages/typescript/ai/src/types.ts:1214

Model-specific options for image generation


numberOfImages?

ts
optional numberOfImages: number;
optional numberOfImages: number;

Defined in: packages/typescript/ai/src/types.ts:1210

Number of images to generate (default: 1)


prompt

ts
prompt: string;
prompt: string;

Defined in: packages/typescript/ai/src/types.ts:1208

Text description of the desired image(s)


size?

ts
optional size: TSize;
optional size: TSize;

Defined in: packages/typescript/ai/src/types.ts:1212

Image size in WIDTHxHEIGHT format (e.g., "1024x1024")