Search Results for

    Show / Hide Table of Contents

    Class ClaudeUsage

    Inheritance
    object
    ClaudeUsage
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Glitch9.AIDevKit.Anthropic
    Assembly: Glitch9.AIDevKit.Provider.Anthropic.dll
    Syntax
    public sealed class ClaudeUsage

    Properties

    | Edit this page View Source

    CacheCreation

    Required. Billing and rate-limit usage.

    Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.

    Under the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in usage will not match one-to-one with the exact visible content of an API request or response.

    For example, output_tokens will be non-zero, even for an empty string response from Claude.

    Total input tokens in a request is the summation of input_tokens, cache_creation_input_tokens, and cache_read_input_tokens.

    Declaration
    [JsonProperty("cache_creation")]
    public CacheCreation CacheCreation { get; set; }
    Property Value
    Type Description
    CacheCreation
    | Edit this page View Source

    CacheCreationInputTokens

    Required. The number of input tokens used to create the cache entry.

    Declaration
    [JsonProperty("cache_creation_input_tokens")]
    public int? CacheCreationInputTokens { get; set; }
    Property Value
    Type Description
    int?
    | Edit this page View Source

    CacheReadInputTokens

    Required. The number of input tokens read from the cache.

    Declaration
    [JsonProperty("cache_read_input_tokens")]
    public int? CacheReadInputTokens { get; set; }
    Property Value
    Type Description
    int?
    | Edit this page View Source

    Container

    Required. Information about the container used in this request.

    This will be non-null if a container tool (e.g. code execution) was used.

    Declaration
    [JsonProperty("container")]
    public AnthropicContainer Container { get; set; }
    Property Value
    Type Description
    AnthropicContainer
    | Edit this page View Source

    InputTokens

    Required. The number of input tokens which were used.

    Declaration
    [JsonProperty("input_tokens")]
    public int InputTokens { get; set; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    OutputTokens

    Required. The number of output tokens which were used.

    Declaration
    [JsonProperty("output_tokens")]
    public int OutputTokens { get; set; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    ServerToolUse

    Required. The number of server tool requests.

    Declaration
    [JsonProperty("server_tool_use")]
    public ServerToolUse ServerToolUse { get; set; }
    Property Value
    Type Description
    ServerToolUse
    | Edit this page View Source

    ServiceTier

    Required. If the request used the priority, standard, or batch tier. Available options: standard, priority, batch

    Declaration
    [JsonProperty("service_tier")]
    public string ServiceTier { get; set; }
    Property Value
    Type Description
    string

    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