Table of Contents

Class ImageVariationRequest

Namespace
OpenAI.Images
Assembly
OpenAI-DotNet.dll
public sealed class ImageVariationRequest : AbstractBaseImageRequest, IDisposable
Inheritance
ImageVariationRequest
Implements
Inherited Members

Constructors

ImageVariationRequest(Stream, string, int, ImageSize, string, ImageResponseFormat, Model)

Constructor.

public ImageVariationRequest(Stream image, string imageName, int numberOfResults = 1, ImageSize size = ImageSize.Large, string user = null, ImageResponseFormat responseFormat = ImageResponseFormat.Url, Model model = null)

Parameters

image Stream

The image to edit. Must be a valid PNG file, less than 4MB, and square.

imageName string

The name of the image.

numberOfResults int

The number of images to generate. Must be between 1 and 10.

size ImageSize

The size of the generated images. Must be one of 256x256, 512x512, or 1024x1024.

user string

A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.

responseFormat ImageResponseFormat

The format in which the generated images are returned. Must be one of url or b64_json.

Defaults to Url
model Model

The model to use for image generation.

ImageVariationRequest(string, int, ImageSize, string, ImageResponseFormat, Model)

Constructor.

public ImageVariationRequest(string imagePath, int numberOfResults = 1, ImageSize size = ImageSize.Large, string user = null, ImageResponseFormat responseFormat = ImageResponseFormat.Url, Model model = null)

Parameters

imagePath string

The image to edit. Must be a valid PNG file, less than 4MB, and square.

numberOfResults int

The number of images to generate. Must be between 1 and 10.

size ImageSize

The size of the generated images. Must be one of 256x256, 512x512, or 1024x1024.

user string

A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.

responseFormat ImageResponseFormat

The format in which the generated images are returned. Must be one of url or b64_json.

Defaults to Url
model Model

The model to use for image generation.

Properties

Image

The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.

public Stream Image { get; }

Property Value

Stream

ImageName

public string ImageName { get; }

Property Value

string

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

~ImageVariationRequest()

protected ~ImageVariationRequest()