Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Outdated Gemini Pro image pricing? By tile, or by image?

I'm trying to understand the pricing for image inputs to Gemini Pro, which seems to be contradictory.

On this page, it's written that the token cost per image is calculated by splitting the image into tiles of 258 tokens each. So a larger image is likely to incur higher token costs than a smaller one. My rough calculations say a maximum sized image would require 16 tiles x 258 tokens/tile = 4,128 tokens.

Here's how tokens are calculated for images:

  • Gemini 1.0 Pro Vision: Each image accounts for 258 tokens.
  • Gemini 1.5 Flash and Gemini 1.5 Pro:
    • If both dimensions of an image are less than or equal to 384 pixels, then 258 tokens are used.
    • If one dimension of an image is greater than 384 pixels, then the image is cropped into tiles. Each tile size defaults to the smallest dimension (width or height) divided by 1.5. If necessary, each tile is adjusted so that it's not smaller than 256 pixels and not greater than 768 pixels. Each tile is then resized to 768x768 and uses 258 tokens.

But here, we see a fixed cost of $0.001315 per image (current Gemini Pro pricing). No mention of tiles or maximum dimensions for that price.

This seems to be contradictory. Anybody know which is the correct info?

Solved Solved
0 4 8,040
1 ACCEPTED SOLUTION

AndrewB
Community Manager
Community Manager

Hi @matvei

Each model has a maximum number of tokens that it can handle in a prompt and response. Knowing the token count of your prompt lets you know whether you've exceeded this limit or not. The token calculations outlined in the first link is useful when calculating or estimating the size of your total prompt, but it is not the cost of the prompt. 

Your second link is the pricing of images in the prompt. As an example your billing report would have a line item that would include:

Gemini 1.5 Pro Image Input - Predictions (the SKU),  XX images input,  total $$ cost for images.

View solution in original post

4 REPLIES 4