interface ImageProvider implements Provider

Methods

string
name()

Get the name of the underlying AI provider.

from  Provider
string
driver()

Get the name of the underlying AI driver.

from  Provider
array
providerCredentials()

Get the credentials for the underlying AI provider.

from  Provider
array
additionalConfiguration()

Get the provider connection configuration other than the driver, key, and name.

from  Provider
withHeaders(array $headers)

Get a provider instance that sends the given HTTP headers with each request.

from  Provider
image(string $prompt, array $attachments = [], string|null $size = null, string|null $quality = null, string|null $model = null, int|null $timeout = null, array $providerOptions = [])

Generate an image.

imageGateway()

Get the provider's image gateway.

useImageGateway(ImageGateway $gateway)

Set the provider's image gateway.

string
defaultImageModel()

Get the name of the default image model.

array
defaultImageOptions(string|null $size = null, string|null $quality = null)

Get the default / normalized image options for the provider.

Details

in Provider at line 12
string name()

Get the name of the underlying AI provider.

Return Value

string

in Provider at line 17
string driver()

Get the name of the underlying AI driver.

Return Value

string

in Provider at line 24
array providerCredentials()

Get the credentials for the underlying AI provider.

Return Value

array

in Provider at line 31
array additionalConfiguration()

Get the provider connection configuration other than the driver, key, and name.

Return Value

array

in Provider at line 40
Provider withHeaders(array $headers)

internal  
 

Get a provider instance that sends the given HTTP headers with each request.

Parameters

array $headers

Return Value

Provider

at line 21
ImageResponse image(string $prompt, array $attachments = [], string|null $size = null, string|null $quality = null, string|null $model = null, int|null $timeout = null, array $providerOptions = [])

Generate an image.

Parameters

string $prompt
array $attachments
string|null $size
string|null $quality
string|null $model
int|null $timeout
array $providerOptions

Return Value

ImageResponse

at line 34
ImageGateway imageGateway()

Get the provider's image gateway.

Return Value

ImageGateway

at line 39
ImageProvider useImageGateway(ImageGateway $gateway)

Set the provider's image gateway.

Parameters

ImageGateway $gateway

Return Value

ImageProvider

at line 45
string defaultImageModel()

Get the name of the default image model.

Return Value

string

at line 52
array defaultImageOptions(string|null $size = null, string|null $quality = null)

Get the default / normalized image options for the provider.

Parameters

string|null $size
string|null $quality

Return Value

array