Class ImageEditRequest
public sealed class ImageEditRequest : AbstractBaseImageRequest, IDisposable
- Inheritance
-
ImageEditRequest
- Implements
- Inherited Members
Constructors
ImageEditRequest(Stream, string, Stream, string, string, int, ImageSize, string, ImageResponseFormat, Model)
[Obsolete("Use new .ctor overload")]
public ImageEditRequest(Stream image, string imageName, Stream mask, string maskName, string prompt, int numberOfResults, ImageSize size = ImageSize.Large, string user = null, ImageResponseFormat responseFormat = (ImageResponseFormat)0, Model model = null)
Parameters
image
StreamimageName
stringmask
StreammaskName
stringprompt
stringnumberOfResults
intsize
ImageSizeuser
stringresponseFormat
ImageResponseFormatmodel
Model
ImageEditRequest(Stream, string, string, int, ImageSize, string, ImageResponseFormat, Model)
[Obsolete("Use new .ctor overload")]
public ImageEditRequest(Stream image, string imageName, string prompt, int numberOfResults, ImageSize size = ImageSize.Large, string user = null, ImageResponseFormat responseFormat = (ImageResponseFormat)0, Model model = null)
Parameters
image
StreamimageName
stringprompt
stringnumberOfResults
intsize
ImageSizeuser
stringresponseFormat
ImageResponseFormatmodel
Model
ImageEditRequest(string, IReadOnlyDictionary<string, Stream>, (string, Stream), int?, string, string, string, ImageResponseFormat, Model)
public ImageEditRequest(string prompt, IReadOnlyDictionary<string, Stream> images, (string, Stream) mask = default, int? numberOfResults = null, string size = null, string quality = null, string user = null, ImageResponseFormat responseFormat = (ImageResponseFormat)0, Model model = null)
Parameters
prompt
stringimages
IReadOnlyDictionary<string, Stream>mask
(string, Stream)numberOfResults
int?size
stringquality
stringuser
stringresponseFormat
ImageResponseFormatmodel
Model
ImageEditRequest(string, string, int, ImageSize, string, ImageResponseFormat, Model)
[Obsolete("Use new .ctor overload")]
public ImageEditRequest(string imagePath, string prompt, int numberOfResults, ImageSize size = ImageSize.Large, string user = null, ImageResponseFormat responseFormat = (ImageResponseFormat)0, Model model = null)
Parameters
imagePath
stringprompt
stringnumberOfResults
intsize
ImageSizeuser
stringresponseFormat
ImageResponseFormatmodel
Model
ImageEditRequest(string, string, string, int, ImageSize, string, ImageResponseFormat, Model)
[Obsolete("Use new .ctor overload")]
public ImageEditRequest(string imagePath, string maskPath, string prompt, int numberOfResults, ImageSize size = ImageSize.Large, string user = null, ImageResponseFormat responseFormat = (ImageResponseFormat)0, Model model = null)
Parameters
imagePath
stringmaskPath
stringprompt
stringnumberOfResults
intsize
ImageSizeuser
stringresponseFormat
ImageResponseFormatmodel
Model
ImageEditRequest(string, string, string, int?, string, string, string, ImageResponseFormat, Model)
public ImageEditRequest(string prompt, string imagePath, string maskPath = null, int? numberOfResults = null, string size = null, string quality = null, string user = null, ImageResponseFormat responseFormat = (ImageResponseFormat)0, Model model = null)
Parameters
prompt
stringimagePath
stringmaskPath
stringnumberOfResults
int?size
stringquality
stringuser
stringresponseFormat
ImageResponseFormatmodel
Model
ImageEditRequest(string, (string, Stream), (string, Stream), int?, string, string, string, ImageResponseFormat, Model)
public ImageEditRequest(string prompt, (string, Stream) image, (string, Stream) mask = default, int? numberOfResults = null, string size = null, string quality = null, string user = null, ImageResponseFormat responseFormat = (ImageResponseFormat)0, Model model = null)
Parameters
prompt
stringimage
(string, Stream)mask
(string, Stream)numberOfResults
int?size
stringquality
stringuser
stringresponseFormat
ImageResponseFormatmodel
Model
Properties
Images
The image(s) to edit.
Must be a supported image file or an array of images.
For gpt-image-1
, each image should be a png
, webp
, or jpg
file less than 25MB.
You can provide up to 16 images.
For dall-e-2
, you can only provide one image, and it should be a square png
file less than 4MB.
public IReadOnlyDictionary<string, Stream> Images { get; }
Property Value
Mask
An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where image
should be edited.
If there are multiple images provided, the mask will be applied on the first image.
Must be a valid PNG file, less than 4MB, and have the same dimensions as image
.
public Stream Mask { get; }
Property Value
MaskName
public string MaskName { get; }
Property Value
Prompt
A text description of the desired image(s).
The maximum length is 1000 characters for dall-e-2
, and 32000 characters for gpt-image-1
.
public string Prompt { get; }
Property Value
Quality
The quality of the image that will be generated.
high
, medium
and low
are only supported for gpt-image-1
.
dall-e-2
only supports standard
quality. Defaults to auto
.
public string Quality { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
~ImageEditRequest()
protected ~ImageEditRequest()