How to count cost of API call for new TTS and transcribe models?

I tried to use the new TTS and transcibe models, but none of them provide any way to calculate costs of the API call. With whisper we were able to use verbose_json and get duration, and the pricing was based on duration. With new models, it’s based on tokens, but no way to get usage. Same with TTS, the old models price was based on text length, which is easy to calculate, but the new price is listed as price per 1M token, but no way to get usage input tokens. Please help :sweat_smile:

I have not found a way to track this yet, but I am also curious how we can obtain token usage of the gpt-4o-transcript model programmatically.