Class ImageVariationRequest
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
StreamThe image to edit. Must be a valid PNG file, less than 4MB, and square.
imageName
stringThe name of the image.
numberOfResults
intThe number of images to generate. Must be between 1 and 10.
size
ImageSizeThe size of the generated images. Must be one of 256x256, 512x512, or 1024x1024.
user
stringA unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.
responseFormat
ImageResponseFormatThe format in which the generated images are returned. Must be one of url or b64_json.
Defaults to Urlmodel
ModelThe 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
stringThe image to edit. Must be a valid PNG file, less than 4MB, and square.
numberOfResults
intThe number of images to generate. Must be between 1 and 10.
size
ImageSizeThe size of the generated images. Must be one of 256x256, 512x512, or 1024x1024.
user
stringA unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.
responseFormat
ImageResponseFormatThe format in which the generated images are returned. Must be one of url or b64_json.
Defaults to Urlmodel
ModelThe 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
ImageName
public string ImageName { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
~ImageVariationRequest()
protected ~ImageVariationRequest()