I recently tested GPT-4o Mini with Vision capabilities, and I noticed a significant discrepancy between the API response usage tokens and the billing tokens in my OpenAI account.
What Happened?
- The API response reported:
"prompt_tokens": 490,
"completion_tokens": 169,
"total_tokens": 659
However, in the OpenAI billing section, it showed:
Input: 8539 tokens.
Output: 169 tokens.
Total: 8708 tokens.
The output token count is identical, but the input token count is drastically different.
What I Expected vs. What I Got
- Based on OpenAI’s vision pricing formula, I estimated my image input would cost ~765 tokens per image (assuming high-res processing).
- Instead, the actual billing token count was far higher than expected.
My Setup:
- Model:
gpt-4o-mini
- Image Size: High-Resolution (likely triggering 765 tokens per image)
- Number of Images: One (not multiple)
- API Call: Single request with an image and text input
Questions:
- Why is the billing input token count so much higher than the API usage response?
- Are there hidden processing costs or extra tokens that OpenAI doesn’t report in API responses?
- Has anyone else experienced similar token discrepancies with GPT-4o Mini Vision?
- Is there a way to accurately estimate the token cost before making API calls?
I appreciate any insights from the community or OpenAI staff. Thanks!