Search Results for

    Show / Hide Table of Contents

    Class TokenPrice

    Represents per-token pricing, distinguishing between input and output token types.

    Inheritance
    object
    ModelPrice
    TokenPrice
    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 TokenPrice : ModelPrice

    Constructors

    | Edit this page View Source

    TokenPrice()

    Declaration
    public TokenPrice()
    | Edit this page View Source

    TokenPrice(TokenType, double)

    Declaration
    public TokenPrice(TokenType tokenType, double cost)
    Parameters
    Type Name Description
    TokenType tokenType
    double cost

    Fields

    | Edit this page View Source

    tokenType

    Whether this price applies to input tokens or output tokens.

    Declaration
    [SerializeField]
    [JsonProperty("tokenType")]
    public TokenType tokenType
    Field Value
    Type Description
    TokenType

    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()

    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