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