Share via


OpenAIClient.GetImageGenerations Method

Definition

Get a set of generated images influenced by a provided textual prompt.

public virtual Azure.Response<Azure.AI.OpenAI.ImageGenerations> GetImageGenerations (Azure.AI.OpenAI.ImageGenerationOptions imageGenerationOptions, System.Threading.CancellationToken cancellationToken = default);
abstract member GetImageGenerations : Azure.AI.OpenAI.ImageGenerationOptions * System.Threading.CancellationToken -> Azure.Response<Azure.AI.OpenAI.ImageGenerations>
override this.GetImageGenerations : Azure.AI.OpenAI.ImageGenerationOptions * System.Threading.CancellationToken -> Azure.Response<Azure.AI.OpenAI.ImageGenerations>
Public Overridable Function GetImageGenerations (imageGenerationOptions As ImageGenerationOptions, Optional cancellationToken As CancellationToken = Nothing) As Response(Of ImageGenerations)

Parameters

imageGenerationOptions
ImageGenerationOptions

The configuration information for the image generation request that controls the content, size, and other details about generated images.

cancellationToken
CancellationToken

An optional cancellation token that may be used to abort an ongoing request.

Returns

The response information for the image generations request.

Exceptions

imageGenerationOptions is null.

imageGenerationOptions.DeploymentName.DeploymentName is null or empty when using Azure OpenAI. Azure OpenAI image generation requires a valid dall-e-3 model deployment.

Applies to