Docs
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
WorkOS
Clerk
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
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:1397

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

Type Parameters

TProviderOptions

TProviderOptions extends object = object

TSize

TSize extends string | undefined = string

Properties

logger

ts
logger: InternalLogger;
logger: InternalLogger;

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

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:1402

The model to use for image generation


modelOptions?

ts
optional modelOptions: TProviderOptions;
optional modelOptions: TProviderOptions;

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

Model-specific options for image generation


numberOfImages?

ts
optional numberOfImages: number;
optional numberOfImages: number;

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

Number of images to generate (default: 1)


prompt

ts
prompt: string;
prompt: string;

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

Text description of the desired image(s)


size?

ts
optional size: TSize;
optional size: TSize;

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

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