Trouble understanding API pricing for Vision

Hey!

I have 47 images (576x1024 resolution) that I wish GPT 4 Vision to describe.

When using the Vision pricing calculator on Pricing it tells me that 1 image (at 576x1024 resolution) will cost me $0.00765. So 47 images should cost me ~$0.36.

However when putting this into practice I ran into the error “RateLimitError: Error code: 429 - {‘error’: {‘message’: 'Request too large for gpt-4-vision-preview in organization org-rwzTap8p3O1TgvGrv4DwCo48 on tokens per min (TPM): Limit 10000, Requested 36001. The input or output tokens must be reduced in order to run successfully.”

So instead of charging me ~$0.36 it wants to charge me for 36k tokens which is $36.

Please help me understand. Thanks!

How is 36k tokens 36 dollars? It is 0.01 for 1000 tokens, not 1 dollar for 1000 tokens.

The error is saying that you crossed the limit of tokens per minute you can upload. Without more info it will be hard to diagnose this issue, as I have no idea if you for example ran the program multiple times or something.

Can you share more details?

4 Likes

Sorry, I’m facepalming right now. I just re-did the math and you’re right - if 1k input tokens for gpt-4-1106-vision-preview cost $0.01 then 36001 tokens would cost $0.36.

I guess I just need to limit the amount of images that I upload per minute and keep it under 10,000 tokens per minute.

Happy to hear that you fixed it :slight_smile: I always make blunders when counting token cost too.

1 Like

@VonSander

Is it OK if a moderator closes this topic?

@VonSander , can you please tell, how do you track if the image uploaded has under 10,000 token per minute ?