API call costing $0.01 instead of $0.004 (as per total token counts)

My backend function makes two OpenAI API calls, 1 to gpt-4o and 2nd to gpt-4o-mini. I am using client.beta.chat.completions.parse() and client.chat.completions.create()

GPT-4o
Token Usage - Prompt Tokens: 1177, Completion Tokens: 153, Total Tokens: 1330

GPT-4o-mini
Token Usage - Prompt Tokens: 3112, Completion Tokens: 199, Total Tokens: 3311

As per

Pricing Details

  • GPT-4o:
    • Input tokens: $2.50 / 1M tokens
    • Output tokens: $10.00 / 1M tokens
  • GPT-4o-mini:
    • Input tokens: $0.150 / 1M tokens
    • Output tokens: $0.600 / 1M tokens

My total cost should be $0.0043168

However, everytime it deducts $0.01.

I also changed both the calls to GPT-4o-mini…still it deducts $0.01.

WHYYY!!!

1 Like

This is not helpful. Please answer the question and show us where he made an error in calculating instead of insulting the man. You’re supposed to be a leader, lead without insults.

2 Likes

:sweat_smile: yes, it was me who misread the title.
I will remove my unhelpful comment.

When you view the cost overview, any amount less than 1 cent is preceded by a “>” symbol, indicating that it is less than a single cent.

In the attached screenshot this is the case for the 4o model.

Thank you for clarifying this. I wasn’t aware. Kudos foradmitting the error too.