Responses/UsageResponse.cs

openai · Betalgo.Ranul.OpenAI.Contracts/Responses/UsageResponse.cs · csharp · MIT
ai

Data transfer object for OpenAI image generation token usage metrics.

// Source: https://github.com/betalgo/openai | License: MIT | Copyright 2022 Betalgo
// Provided via justclaw.it.com; keep this notice with the code.
using System.Text.Json.Serialization;

namespace Betalgo.Ranul.OpenAI.Contracts.Responses;

/// <summary>
///     For <c>gpt-image-1</c> only, the token usage information for the image generation.
/// </summary>
public class UsageResponse
{
    /// <summary>
    ///     Initializes a new instance of the <see cref="UsageResponse" /> class.
    /// </summary>
    public UsageResponse()
    {
    }

    /// <summary>
    ///     Initializes a new instance of the <see cref="UsageResponse" /> class.
    /// </summary>
    /// <param name="totalTokens">
    ///     The total number of tokens (images and text) used for the image generation.
    /// 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key