Search Results for

    Show / Hide Table of Contents

    Class ImageGenerationTool

    A tool that generates images using a model like gpt-image-1.

    Inheritance
    object
    Tool
    ImageGenerationTool
    Inherited Members
    Tool.Type
    Tool.TryGetToolName(out string)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Glitch9.AIDevKit
    Assembly: Glitch9.AIDevKit.dll
    Syntax
    public class ImageGenerationTool : Tool

    Properties

    | Edit this page View Source

    Background

    Optional. Background type for the generated image. One of transparent, opaque, or auto.

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

    InputFidelity

    Optional. Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for gpt-image-1. Supports high and low. Defaults to low.

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

    InputImageMask

    Optional. Optional mask for inpainting. Contains image_url (string, optional) and file_id (string, optional).

    Declaration
    [JsonProperty("input_image_mask")]
    public OpenAITypes.ImageReference InputImageMask { get; set; }
    Property Value
    Type Description
    OpenAITypes.ImageReference
    | Edit this page View Source

    Model

    Optional. The image generation model to use. Default: gpt-image-1.

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

    Moderation

    Optional. Moderation level for the generated image. Default: auto.

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

    OutputCompression

    Optional. Compression level for the output image. Default: 100.

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

    OutputFormat

    Optional. The output format of the generated image. One of png, webp, or jpeg. Default: png.

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

    PartialImages

    Optional. Number of partial images to generate in streaming mode, from 0 (default value) to 3.

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

    Quality

    Optional. The quality of the generated image. One of low, medium, high, or auto. Default: auto.

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

    Size

    Optional. The size of the generated image. One of 1024x1024, 1024x1536, 1536x1024, or auto. Default: auto.

    Declaration
    [JsonProperty("size")]
    public MediaSize? Size { get; set; }
    Property Value
    Type Description
    MediaSize?

    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)
    SystemExtensions.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation