Interface: ImageOptions
@providerprotocol/ai / @providerprotocol/ai / ImageOptions
Interface: ImageOptions<TParams>
Section titled “Interface: ImageOptions<TParams>”Defined in: src/types/image.ts:45
Options for creating an image instance with the image() function.
Example
Section titled “Example”const options: ImageOptions<OpenAIImageParams> = { model: openai('dall-e-3'), config: { apiKey: process.env.OPENAI_API_KEY }, params: { size: '1024x1024', quality: 'hd' }};Type Parameters
Section titled “Type Parameters”TParams
Section titled “TParams”TParams = unknown
Provider-specific parameter type
Properties
Section titled “Properties”config?
Section titled “config?”
optionalconfig:ProviderConfig
Defined in: src/types/image.ts:50
Provider infrastructure configuration
middleware?
Section titled “middleware?”
optionalmiddleware:Middleware[]
Defined in: src/types/image.ts:61
Middleware for intercepting and transforming requests and responses.
Middleware are executed in array order for request/start hooks, and reverse order for response/end hooks.
model:
ImageModelInput
Defined in: src/types/image.ts:47
A model reference from a provider factory
params?
Section titled “params?”
optionalparams:TParams
Defined in: src/types/image.ts:53
Provider-specific parameters (passed through unchanged)