2.5 Pro Preview API: thoughts pricing

Regarding 2.5 Pro Preview API Pricing:

  1. to calculate my total charge, please confirm: candidates_token_count INCLUDES thoughts_token_count and I multiply it by the OUTPUT token rate. Then, I add prompt_token_count multiplied by the INPUT token rate.
  2. how to configure the amount of thinking via the (Python) API?

Many thanks,
Elias

Hi @Ilias_Efstathiou Apologies for late response
You’re mostly correct. Total Charge Calculation:
( candidates_token_count ) * OUTPUT token rate (both the final output and the thinking tokens)+ (prompt_token_count ) * INPUT token rate (initial input to the model).

it’s important to note that thinkingBudget is currently only fully supported for Gemini 2.5 Flash, not Gemini 2.5 Pro. You can get more information of the pricing here Gemini Developer API Pricing  |  Gemini API  |  Google AI for Developers

Thank you