Search Results for

    Show / Hide Table of Contents

    Class ImagePrice

    Represents per-image pricing, optionally scoped by resolution and quality tier.

    Inheritance
    object
    ModelPrice
    ImagePrice
    Inherited Members
    ModelPrice.Type
    ModelPrice.CostInUsd
    ModelPrice.m_TypeNameCache
    ModelPrice.Free()
    ModelPrice.PerCharacter(double)
    ModelPrice.PerRequest(double)
    ModelPrice.PerMinute(double, bool)
    ModelPrice.PerInputToken(double)
    ModelPrice.PerImage(double)
    ModelPrice.PerIO(double, double)
    ModelPrice.PerICO(double, double, double)
    ModelPrice.CalcCostInUsd(double)
    ModelPrice.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Glitch9.AIDevKit
    Assembly: Glitch9.AIDevKit.dll
    Syntax
    [Serializable]
    public class ImagePrice : ModelPrice

    Constructors

    | Edit this page View Source

    ImagePrice()

    Declaration
    public ImagePrice()
    | Edit this page View Source

    ImagePrice(double)

    Declaration
    public ImagePrice(double cost)
    Parameters
    Type Name Description
    double cost

    Fields

    | Edit this page View Source

    noBackground

    Whether this price applies to images generated without a background (PixelArt only).

    Declaration
    [SerializeField]
    [JsonProperty("noBackground")]
    public bool noBackground
    Field Value
    Type Description
    bool
    | Edit this page View Source

    quality

    The quality tier this price applies to (OpenAI only).

    Declaration
    [SerializeField]
    [JsonProperty("quality")]
    public OpenAITypes.ImageQuality quality
    Field Value
    Type Description
    OpenAITypes.ImageQuality
    | Edit this page View Source

    size

    The image resolution this price applies to. Default matches any size.

    Declaration
    [SerializeField]
    [JsonProperty("size")]
    public MediaSize size
    Field Value
    Type Description
    MediaSize

    Methods

    | Edit this page View Source

    GetTypeName()

    Returns a human-readable label for this price type (e.g. "Input Token", "HD Image").

    Declaration
    public override string GetTypeName()
    Returns
    Type Description
    string
    Overrides
    ModelPrice.GetTypeName()
    | Edit this page View Source

    OpenAI(MediaSize, ImageQuality, double)

    Creates an OpenAI image price entry for a specific size and quality combination.

    Declaration
    public static ImagePrice OpenAI(MediaSize size, OpenAITypes.ImageQuality quality, double cost)
    Parameters
    Type Name Description
    MediaSize size
    OpenAITypes.ImageQuality quality
    double cost
    Returns
    Type Description
    ImagePrice
    | Edit this page View Source

    PixelArt(int, int, double, bool)

    Creates a PixelArt image price entry for a specific resolution, optionally without background.

    Declaration
    public static ImagePrice PixelArt(int width, int height, double cost, bool noBackground = false)
    Parameters
    Type Name Description
    int width
    int height
    double cost
    bool noBackground
    Returns
    Type Description
    ImagePrice

    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