Class ModelPrice
Abstract base class representing the pricing information for a model usage tier.
Derived classes represent specific billing units such as per-token, per-image, or per-second.
Assembly: Glitch9.AIDevKit.dll
Syntax
[Serializable]
[JsonConverter(typeof(ModelPriceJsonConverter))]
public abstract class ModelPrice
Constructors
|
Edit this page
View Source
ModelPrice()
Declaration
|
Edit this page
View Source
ModelPrice(UsageType, double)
Declaration
protected ModelPrice(UsageType type, double costInUsd)
Parameters
Fields
|
Edit this page
View Source
m_TypeNameCache
Declaration
protected string m_TypeNameCache
Field Value
Properties
|
Edit this page
View Source
CostInUsd
Declaration
[JsonIgnore]
public double CostInUsd { get; }
Property Value
|
Edit this page
View Source
Type
Declaration
[JsonIgnore]
public UsageType Type { get; }
Property Value
Methods
|
Edit this page
View Source
CalcCostInUsd(double)
Calculates the total cost in USD for the given usage amount.
Declaration
public double CalcCostInUsd(double amount)
Parameters
| Type |
Name |
Description |
| double |
amount |
|
Returns
|
Edit this page
View Source
Free()
Declaration
public static ModelPrice[] Free()
Returns
|
Edit this page
View Source
GetTypeName()
Returns a human-readable label for this price type (e.g. "Input Token", "HD Image").
Declaration
public virtual string GetTypeName()
Returns
|
Edit this page
View Source
PerCharacter(double)
Declaration
public static ModelPrice[] PerCharacter(double cost)
Parameters
| Type |
Name |
Description |
| double |
cost |
|
Returns
|
Edit this page
View Source
PerICO(double, double, double)
Declaration
public static ModelPrice[] PerICO(double input, double cachedInput, double output)
Parameters
Returns
|
Edit this page
View Source
PerIO(double, double)
Declaration
public static ModelPrice[] PerIO(double input, double output)
Parameters
Returns
|
Edit this page
View Source
PerImage(double)
Declaration
public static ModelPrice[] PerImage(double cost)
Parameters
| Type |
Name |
Description |
| double |
cost |
|
Returns
|
Edit this page
View Source
Declaration
public static ModelPrice[] PerInputToken(double cost)
Parameters
| Type |
Name |
Description |
| double |
cost |
|
Returns
|
Edit this page
View Source
PerMinute(double, bool)
Declaration
public static ModelPrice[] PerMinute(double cost, bool isEstimated = false)
Parameters
| Type |
Name |
Description |
| double |
cost |
|
| bool |
isEstimated |
|
Returns
|
Edit this page
View Source
PerRequest(double)
Declaration
public static ModelPrice[] PerRequest(double cost)
Parameters
| Type |
Name |
Description |
| double |
cost |
|
Returns
|
Edit this page
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides
Extension Methods