Table of Contents

Class AbstractBaseImageRequest

Namespace
OpenAI.Images
Assembly
OpenAI-DotNet.dll

Abstract base image class for making requests.

public abstract class AbstractBaseImageRequest
Inheritance
AbstractBaseImageRequest
Derived
Inherited Members

Constructors

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

[Obsolete("Use new .ctor overload")]
protected AbstractBaseImageRequest(Model model, int numberOfResults, ImageSize size, ImageResponseFormat responseFormat, string user)

Parameters

model Model
numberOfResults int
size ImageSize
responseFormat ImageResponseFormat
user string

AbstractBaseImageRequest(Model, int?, string, ImageResponseFormat, string)

protected AbstractBaseImageRequest(Model model = null, int? numberOfResults = null, string size = null, ImageResponseFormat responseFormat = (ImageResponseFormat)0, string user = null)

Parameters

model Model
numberOfResults int?
size string
responseFormat ImageResponseFormat
user string

Properties

Model

The model to use for image generation. Only dall-e-2 and gpt-image-1 are supported. Defaults to dall-e-2 unless a parameter specific to gpt-image-1 is used.

public string Model { get; }

Property Value

string

Number

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

public int? Number { get; }

Property Value

int?

ResponseFormat

The format in which generated images with dall-e-2 and dall-e-3 are returned. Must be one of url or b64_json. URLs are only valid for 60 minutes after the image has been generated. gpt-image-1 does not support urls and only supports base64-encoded images.

public ImageResponseFormat ResponseFormat { get; }

Property Value

ImageResponseFormat

Size

The size of the generated images. Must be one of 1024x1024, 1536x1024 (landscape), 1024x1536 (portrait), or auto (default value) for gpt-image-1, and one of 256x256, 512x512, or 1024x1024 for dall-e-2.

public string Size { get; }

Property Value

string

User

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

public string User { get; }

Property Value

string