Skip to content

[FEATURE REQ] Expose used tokens on transcription #819

@bw-flagship

Description

@bw-flagship

Describe the feature or improvement you are requesting

I use AudioClient.TranscribeAudioAsync and would like to know how many tokens I consumed.

The API itself returns this info:

{
  "text": "some text.",
  "usage": {
    "type": "tokens",
    "input_tokens": 14,
    "input_token_details": {
      "text_tokens": 0,
      "audio_tokens": 14
    },
    "output_tokens": 45,
    "total_tokens": 59
  }
}

See https://platform.openai.com/docs/api-reference/audio/createTranscription

But the library only returns ClientResult<AudioTranscription> which does not contain information about the used tokens.

Additional context

Other methods (e.g. in the responses api) return the information about used tokens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: audioThis item is related to Audioblocked: specThis issue is blocked on a needed REST API spec update.feature-requestCategory: A new feature or enhancement to an existing feature is being requested.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions