Class ImageGenerationRequest
Provider-neutral request for generating images from a text prompt.
public class ImageGenerationRequest
- Inheritance
-
ImageGenerationRequest
- Derived
- Inherited Members
Constructors
ImageGenerationRequest()
public ImageGenerationRequest()
Properties
Background
Requested background behavior or a provider-supported automatic value.
public ImageBackground Background { get; set; }
Property Value
Count
Number of images requested.
public int Count { get; set; }
Property Value
Model
Optional image model override. When omitted, the service default is used.
public string? Model { get; set; }
Property Value
OutputCompression
Optional compression level for formats that support compression.
public int? OutputCompression { get; set; }
Property Value
- int?
OutputFormat
Requested encoding. Auto selects the provider default; inspect GeneratedImage.MediaType when saving. Providers without a matching encoding control reject explicit formats before making an API call. The library does not transcode returned images.
public ImageOutputFormat OutputFormat { get; set; }
Property Value
Prompt
Description of the image to generate.
public string Prompt { get; set; }
Property Value
Quality
Requested output quality. OpenAI GPT Image 2.5 also supports XHigh and Max; other providers and models validate their own supported levels.
public ImageQuality Quality { get; set; }
Property Value
Size
Requested sizing mode. Use ImageSize.Pixels for exact dimensions or ImageSize.Preset for a resolution grade and optional aspect ratio. Unsupported modes are rejected.
public ImageSize Size { get; set; }