Feature request: Return image tokens in usage response

It would be awesome if the usage statistics in the chat completion object included image token usage, like it does audio. We process a ton of images with gpt4o, and it would be great to receive confirmation from OpenAI on how much of our general token consumption comes from images.

Right now, we need to implement our own image tokenizer (since TikToken doesn’t natively support it) and fire off a separate request to log the “estimated” image token consumption. This kinda clogs our workflow and is much lower fidelity than if OpenAI’s API response confirmed what we actually used.

Thanks! If anyone else has tips on some other way to do this, much appreciated.

5 Likes

In any case, would be great to confirm that image token consumption is not included in the usage returned in the chat completions object.

I tested out a number of completions (on 4o-mini) and it appears that the usage reflected in the organization.usage.completions endpoint includes the image tokens, whereas the usage returned in the completion object does not.