AI DevKit
Search Results for

    Show / Hide Table of Contents

    Class Model

    ScriptableObject representation of a generative AI model with metadata, configuration, and pricing information. Supports token limits, ownership, creation time, and dynamic pricing for various content types (text, image, audio).

    Inheritance
    object
    ApiAsset
    Model
    Inherited Members
    ApiAsset.id
    ApiAsset.displayName
    ApiAsset.api
    ApiAsset.deprecated
    ApiAsset.custom
    ApiAsset.locked
    ApiAsset.Id
    ApiAsset.Name
    ApiAsset.Api
    ApiAsset.IsCustom
    ApiAsset.IsDeprecated
    ApiAsset.ToString()
    ApiAsset.Equals(ApiAsset)
    ApiAsset.Equals(object)
    ApiAsset.GetHashCode()
    Namespace: Glitch9.AIDevKit
    Assembly: .dll
    Syntax
    public class Model : ApiAsset

    Properties

    Family

    The family classification of the model (e.g., GPT, Gemini, Imagen). This information is usually used to determine the structure of the request body.

    Declaration
    public string Family { get; }
    Property Value
    Type Description
    string

    Features

    Features of the model, such as text generation, image generation, etc. This information is used to determine the capabilities of the model.

    Declaration
    public ModelFeature Features { get; }
    Property Value
    Type Description
    ModelFeature

    InputModality

    A bitflag indicating supported input modalities (e.g., Text, Image, Audio). This information is used to determines which input types the model supports.

    Declaration
    public Modality InputModality { get; }
    Property Value
    Type Description
    Modality

    IsFineTuned

    Indicates whether the model is a fine-tuned version (i.e., custom).

    Declaration
    public bool IsFineTuned { get; }
    Property Value
    Type Description
    bool

    IsLegacy

    Indicates whether the model is a legacy version. Legacy models often have a different endpoint or API structure.

    Declaration
    public bool IsLegacy { get; }
    Property Value
    Type Description
    bool

    MaxInputTokens

    The maximum number of input tokens allowed for this model.

    Declaration
    public int MaxInputTokens { get; }
    Property Value
    Type Description
    int

    MaxN

    The maximum number of images that this model can generate in a single request. This information is only relevant for image generation models.

    Declaration
    public int MaxN { get; }
    Property Value
    Type Description
    int

    MaxOutputTokens

    The maximum number of output tokens that the model can generate.

    Declaration
    public int MaxOutputTokens { get; }
    Property Value
    Type Description
    int

    OutputModality

    A bitflag indicating supported output modalities (e.g., Text, Image, Audio). This information is used to determines which output types the model supports.

    Declaration
    public Modality OutputModality { get; }
    Property Value
    Type Description
    Modality

    Prices

    An array of pricing definitions for this model based on content type and usage (e.g., per 1K tokens).

    Declaration
    public ModelPrice[] Prices { get; }
    Property Value
    Type Description
    ModelPrice[]

    Version

    The specific version identifier of the model.

    Declaration
    public string Version { get; }
    Property Value
    Type Description
    string

    VersionNumber

    The version identifier for the model's family or group (e.g., GPT-4, Gemini-1.5).

    Declaration
    public float VersionNumber { get; }
    Property Value
    Type Description
    float

    Methods

    EstimatePrice(Usage)

    Estimates the price of using the model based on a usage report. Automatically handles free usage and empty input.

    Declaration
    public Currency EstimatePrice(Usage usage)
    Parameters
    Type Name Description
    Usage usage

    The usage data containing token counts by type.

    Returns
    Type Description
    Currency

    A Glitch9.Currency object representing the estimated price.

    HasFeature(ModelFeature)

    Declaration
    public bool HasFeature(ModelFeature feature)
    Parameters
    Type Name Description
    ModelFeature feature
    Returns
    Type Description
    bool

    Operators

    implicit operator Model(string)

    Declaration
    public static implicit operator Model(string apiName)
    Parameters
    Type Name Description
    string apiName
    Returns
    Type Description
    Model
    In this article
    Back to top Generated by DocFX