Search Results for

    Show / Hide Table of Contents

    Class OpenAIImageData

    Inheritance
    object
    OpenAIImageData
    Implements
    IImageAsset
    IImageChunk
    IBase64Source
    IUsageProvider
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Glitch9.AIDevKit.OpenAI
    Assembly: Glitch9.AIDevKit.Provider.OpenAI.dll
    Syntax
    public sealed class OpenAIImageData : IImageAsset, IImageChunk, IBase64Source, IUsageProvider

    Fields

    | Edit this page View Source

    EditCompleted

    Declaration
    public const string EditCompleted = "image_edit.completed"
    Field Value
    Type Description
    string
    | Edit this page View Source

    EditPartialImage

    Declaration
    public const string EditPartialImage = "image_edit.partial_image"
    Field Value
    Type Description
    string
    | Edit this page View Source

    GenerationCompleted

    Declaration
    public const string GenerationCompleted = "image_generation.completed"
    Field Value
    Type Description
    string
    | Edit this page View Source

    GenerationPartialImage

    Declaration
    public const string GenerationPartialImage = "image_generation.partial_image"
    Field Value
    Type Description
    string

    Properties

    | Edit this page View Source

    B64Json

    Required. Base64-encoded partial or final image data, suitable for rendering as an image.

    Declaration
    [JsonProperty("b64_json")]
    public string B64Json { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Background

    Required. The background setting for the requested or generated image.

    Declaration
    [JsonProperty("background")]
    public OpenAITypes.ImageBackground? Background { get; set; }
    Property Value
    Type Description
    OpenAITypes.ImageBackground?
    | Edit this page View Source

    CreatedAt

    Required. The Unix timestamp when the event was created.

    Declaration
    [JsonProperty("created_at")]
    public UnixTime? CreatedAt { get; set; }
    Property Value
    Type Description
    UnixTime?
    | Edit this page View Source

    Encoding

    Declaration
    [JsonIgnore]
    public ImageEncoding Encoding { get; }
    Property Value
    Type Description
    ImageEncoding
    | Edit this page View Source

    Metadata

    Declaration
    [JsonIgnore]
    public Metadata Metadata { get; }
    Property Value
    Type Description
    Metadata
    | Edit this page View Source

    OutputFormat

    Required. The output format for the requested or generated image.

    Declaration
    [JsonProperty("output_format")]
    public string OutputFormat { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    PartialImageIndex

    Optional. 0-based index for the partial image (streaming).

    Declaration
    [JsonProperty("partial_image_index")]
    public int? PartialImageIndex { get; set; }
    Property Value
    Type Description
    int?
    | Edit this page View Source

    Quality

    Required. The quality setting for the requested or generated image.

    Declaration
    [JsonProperty("quality")]
    public OpenAITypes.ImageQuality? Quality { get; set; }
    Property Value
    Type Description
    OpenAITypes.ImageQuality?
    | Edit this page View Source

    Size

    Required. The size of the requested or generated image.

    Declaration
    [JsonProperty("size")]
    public MediaSize? Size { get; set; }
    Property Value
    Type Description
    MediaSize?
    | Edit this page View Source

    Type

    Required. The type of the event.

    Declaration
    [JsonProperty("type")]
    public string Type { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Usage

    Optional. For gpt-image-1 only, the token usage information for the image generation.

    Declaration
    [JsonProperty("usage")]
    public Usage Usage { get; set; }
    Property Value
    Type Description
    Usage

    Methods

    | Edit this page View Source

    GetBase64String()

    Declaration
    public string GetBase64String()
    Returns
    Type Description
    string
    | Edit this page View Source

    GetUsage()

    Declaration
    public Usage GetUsage()
    Returns
    Type Description
    Usage
    | Edit this page View Source

    IsValid()

    Declaration
    public bool IsValid()
    Returns
    Type Description
    bool

    Implements

    IImageAsset
    IImageChunk
    IBase64Source
    IUsageProvider

    Extension Methods

    ArrayExtensions.ToArrayOrEmpty<T>(T)
    ArrayExtensions.ToArrayOrNull<T>(T)
    EventExtensions.ToDelta<T>(T, string, int, string, bool)
    EventExtensions.ToDone<T>(T, string, int, string)
    EventExtensions.ToEvent<T>(T)
    EventExtensions.UpcastDelta<T1, T2>(T1, string, int, string, bool)
    FallbackExtensions.IsOr<TParent, TChild>(TParent, TChild)
    ResponseCastingExtensions.GetResult<T>(T)
    IOExtensions.ToSprite(IImageAsset)
    IOExtensions.ToSpriteAsync(IImageAsset)
    IOExtensions.ToTexture2D(IImageAsset)
    IOExtensions.ToTexture2DAsync(IImageAsset)
    IOExtensions.ToTexture2D(IImageChunk)
    IOExtensions.ToTexture2DAsync(IImageChunk)
    SystemExtensions.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation