I mean an image can’t have only 3085 token for sure… so the 52k looks right to me… it looks like it only shows the token beside the image in the usage block…
Actually I would even say 52k is pretty low for an image.
You should try to display the asci code of a base64 encoded image and then devide the number of characters in it roughly by let’s say 3 or 4 - which should come out to the right amount of tokens the image would consume…
Actually I am not quiet sure… I was more like assuming the discrepancy came from that. You may as well just test what happens when you send two different pictures (one large and one small)?
There is one initial thing to know: If you are using the gpt-4o-mini API model for vision, the costs of images are equivalent in price to gpt-4o-2024-05-13, and are actually double that of gpt-4o-2024-08-06 and gpt-4o-2024-11-20.
This equivalent or increased pricing is reflected by a multiplication of the input tokens used by images. This higher token billing of mini (about 33x gpt-4o) should be seen in the API response usage though.
If you use detail:low, then the token consumption of an image is just 85 tokens. If you do not specify a detail parameter or set it to “high”, large images are broken up into 512 pixel tiles that each cost 170 tokens. The largest images can consume 170*8 + 85 tokens.
However, your concern is about the usage page.
This usage cost of either model that you see in the API response usage report should also be reflected accurately in the usage page. However, you do not get a clear report of a single request there. When looking at the usage page, it may simply be a misunderstanding of multiple past requests being combined
If you need a more fine-grained analysis, you can use the “export” feature there on the usage page when looking at your entire organization, or use the usage API with administration API key.