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

Costing wrt Gemini API

I had some queries and wanted clarification on costing that will be encountered once we start using the Gemini API (model -gemini-pro).
Please confirm if below analysis/understanding is correct
 
We have an application built in flutter where the users will be taking pictures of the Doctors visiting card. The users will be meeting about 12 doctors in a day.
The details of the card will be sent to Gemini API to extract information such as Doctor name, Phone number, Qualification etc.
 
We have done POC and found that max 32 tokens will be sent as an input per API call and max 32 tokens will be received as output.
 
Number of users =>             6000
Number of API calls  =>       6000 users X 12 Doctors = 72000 API calls per day
Number of token per day => 72000 API calls X 32 tokens per call = 2304000 or 2.304 million tokens.
 
Cost per million input token (Unit price)    =>    0.35$
Cost per million output token (Unit price)  =>   1.05$
 
(A) Monthly cost for Input token =>   2.304M tokens X unit price of 0.35$ X 30 days =  24.19$
(B) Monthly cost for Output token =  2.304M tokens X unit price of 1.05$ X 30 days = 72.58$
 
Total monthly cost => A + B =  96.77$
 
The above figures are approximations and best to my knowledge. 
Please confirm if the understanding of the pricing and calculations are correct wrt Monthly billing.
0 3 6,726
3 REPLIES 3

Hi Nitin,

Your analysis is thorough, but if your app will give an image input each time, that has an additional cost. Let's refine the calculations to ensure they are as accurate as possible. We'll base the following calculations on the Gemini 1.0 Pro model and clarify some points regarding token and character approximations.

Clarification on Tokens and Characters

On this page, the pricing is given for each character. In English, a token typically represents about 4 characters or roughly three-quarters of a word, although they are not uniformly sized. I have given a calculation below according to characters. 

Detailed Breakdown and Calculations

  1. Image Input Cost:

    • Total number of images processed per day: 72000
    • Total number of images processed per month: 72000 * 30 = 2,160,000
    • Cost per image: $0.002500
    • Daily image input cost: 72000 * $0.0025 = $180.00
    • Monthly image input cost: $180.00 * 30 = $5400.00
  2. Video Input Cost:

    • Total duration of videos processed per day: 0 seconds
    • Total duration of videos processed per month: 0 * 30 = 0 seconds
    • Cost per second of video: $0.000000
    • Daily video input cost: 0 * $0.000000 = $0.00
    • Monthly video input cost: $0.00 * 30 = $0.00
  3. Text Input Cost:

    • Total number of characters processed per day: 72000 API calls * 128 characters per call = 9,216,000 characters
    • Total number of characters processed per month: 9,216,000 * 30 = 276,480,000 characters
    • Cost per 1k characters: $0.000125
    • Daily text input cost: 9,216,000 / 1000 * $0.000125 = $1.15
    • Monthly text input cost: $1.15 * 30 = $34.56
  4. Audio Input Cost:

    • Total duration of audio processed per day: 0 seconds
    • Total duration of audio processed per month: 0 * 30 = 0 seconds
    • Cost per second of audio: $0.000000
    • Daily audio input cost: 0 * $0.000000 = $0.00
    • Monthly audio input cost: $0.00 * 30 = $0.00
  5. Text Output Cost:

    • Total number of characters generated per day: 72000 API calls * 128 characters per call = 9,216,000 characters
    • Total number of characters generated per month: 9,216,000 * 30 = 276,480,000 characters
    • Cost per 1k characters: $0.000375
    • Daily text output cost: 9,216,000 / 1000 * $0.000375 = $3.46
    • Monthly text output cost: $3.46 * 30 = $103.68

Summary

  • Monthly image input cost: $5400.00
  • Monthly video input cost: $0.00
  • Monthly text input cost: $34.56
  • Monthly audio input cost: $0.00
  • Monthly text output cost: $103.68
  • Total monthly cost: $5538.24

Based on these calculations, the total monthly cost for using the Gemini API (model Gemini 1.0 Pro) is approximately $5538.24.

Since I had to do my calculations, I made an a small app for this. You can check it out here: https://gemini-api-pricing.streamlit.app/ 

Hope this helps 🙂

The price of 1.5 flash in the calculator seems to be incorrect. The price has been updated, and we hope to make the change.

Hi Jackiey, 

Thanks for informing. I went through this page once again, and I have updated the costing for Gemini-1.5-Flash in the <URL removed  by staff> Hope it helps!

Regards, 

Dev.