Which factor most directly drives the token cost of an image in a VLM request?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
An image's token cost is set by how many vision tokens the encoder emits, which scales with resolution and tiling, not by file size, compression, or aspect ratio.
Imagine you pay a reader by the number of index cards they have to read, not by how heavy the folder is. You could compress a photo into a tiny file or a huge one, but the reader still turns it into the same number of cards. What actually changes the card count is how finely you slice the picture. A quick low-detail look becomes a few cards. A high-detail look, where you cut the photo into many tiles so the reader can see the fine print, becomes many cards. So the price tracks how many tiles and how much detail you asked for, not the size of the file sitting on your disk.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
Establish that the model bills in tokens not bytes, trace where file size and compression get decoded away, and explain how tiling turns resolution into a token-count multiplier that drives both cost and prefill latency.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Assuming a smaller file means a cheaper image. Compressing the JPEG changes bytes on disk, but the encoder still emits the same number of vision tokens.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.