IntelligenceX

API Reference

Class

TurnUsage

Namespace IntelligenceX.OpenAI.AppServer.Models
Assembly IntelligenceX
Modifiers sealed

Represents token usage details for a single turn.

Inheritance

  • Object
  • TurnUsage

Usage

Explore 3 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 2

Accepted by parameters 1

Constructors

public TurnUsage(Int64? inputTokens, Int64? outputTokens, Int64? totalTokens, Int64? cachedInputTokens, Int64? reasoningTokens, JsonObject raw, JsonObject? additional) #

Initializes a new turn usage model.

Parameters

inputTokens System.Int64? requiredposition: 0
outputTokens System.Int64? requiredposition: 1
totalTokens System.Int64? requiredposition: 2
cachedInputTokens System.Int64? requiredposition: 3
reasoningTokens System.Int64? requiredposition: 4
raw IntelligenceX.Json.JsonObject requiredposition: 5
additional IntelligenceX.Json.JsonObject? requiredposition: 6

Methods

public static TurnUsage? FromJson(JsonObject? obj) #
Returns: TurnUsage?

Parses turn usage from JSON.

Parameters

obj IntelligenceX.Json.JsonObject? requiredposition: 0
Source usage object.

Returns

The parsed usage or null.

public JsonObject ToJson() #
Returns: JsonObject

Serializes usage to JSON.

Properties

public Int64? InputTokens { get; } #

Gets input/prompt token count.

public Int64? OutputTokens { get; } #

Gets output/completion token count.

public Int64? TotalTokens { get; } #

Gets total token count.

public Int64? CachedInputTokens { get; } #

Gets cached input token count.

public Int64? ReasoningTokens { get; } #

Gets reasoning token count.

public JsonObject Raw { get; } #

Gets the raw JSON usage object.

public JsonObject? Additional { get; } #

Gets unrecognized fields from the payload.