Class Usage
Usage statistics for the completion request.
Assembly: .dll
Syntax
[Serializable]
public class Usage
Constructors
Usage()
Declaration
Usage(Dictionary<UsageType, int>)
Declaration
public Usage(Dictionary<UsageType, int> usages)
Parameters
Type |
Name |
Description |
Dictionary<UsageType, int> |
usages |
|
Fields
modelId
Declaration
Field Value
usages
Declaration
public SerializableDictionary<UsageType, int> usages
Field Value
Type |
Description |
SerializableDictionary<UsageType, int> |
|
Properties
AcceptedPredictionTokens
Number of tokens that matched model predictions and were accepted (prediction mode).
Declaration
public int? AcceptedPredictionTokens { get; set; }
Property Value
Number of tokens derived from audio input (e.g., in transcriptions).
Declaration
public int? AudioInputTokens { get; set; }
Property Value
AudioOutputTokens
Number of tokens used for audio output (e.g., in TTS responses).
Declaration
public int? AudioOutputTokens { get; set; }
Property Value
Number of tokens reused from cache instead of re-sending in the input (for efficiency).
Declaration
public int? CachedInputTokens { get; set; }
Property Value
Number of tokens used in the prompt (input sent by the user).
Declaration
public int? InputTokens { get; set; }
Property Value
IsEmpty
Returns true if no usage data is present.
Declaration
public bool IsEmpty { get; }
Property Value
IsFree
Returns true if the response was free of charge (marked with UsageType.Free).
Declaration
public bool IsFree { get; }
Property Value
OutputTokens
Number of tokens generated in the response (output by the model).
Declaration
public int? OutputTokens { get; set; }
Property Value
ReasoningTokens
Number of tokens spent on internal reasoning (e.g., CoT steps).
Declaration
public int? ReasoningTokens { get; set; }
Property Value
RejectedPredictionTokens
Number of tokens that were predicted but rejected or unused.
Declaration
public int? RejectedPredictionTokens { get; set; }
Property Value
TrainingTokens
Number of tokens used for fine-tuning or training the model.
Declaration
public int? TrainingTokens { get; set; }
Property Value
Methods
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type |
Description |
string |
A string that represents the current object.
|
Overrides
object.ToString()