In Voiceflow, models like GPT-4o count token usage by multiplying by a value x. For example, GPT-4o counts tokens as 6 times the total tokens. If the total tokens, including input and output, are 2k, they are multiplied by 6, resulting in 12k tokens counted. Do the OpenAI Assistant API models count tokens in the same way?
Welcome to the dev forum @razasaqlain85
I’m not sure how VoiceFlow counts tokens.
Here’s how tokens are counted on OpenAI models:
Text tokens are counted based on the encodings used by the model.
E.g. gpt-3.5-turbo
, gpt-4
and its turbo and vision models use cl100k_base
encodings.
gpt-4o
however uses o200k_base
encodings.
Here’s docs showing how image tokens are counted.
The Assistants API involves other costs as well, such as the vector storage cost of $0.10 / GB of vector storage per day (free up to 1GB), and code interpreter costs $0.03 / session.
1 Like