b
# Gemini token counts: # According to Gemini API docs, an image typically costs 258 tokens (for models like 1.5/2.0 Flash) or a fixed amount per image. # Let's check Google's image token rules. Usually, standard image size is fixed to 258 tokens. # Prompt: "Сделай полное описание..." ~ 10 tokens.
# Total input tokens per image = 258 + 10 = 268 tokens.
# Total input tokens for 1M images = 1,000,000 * 268 = 268,000,000 tokens.
# Output text: 400-500 characters. In Russian, 1 token is roughly 2 characters (sometimes more, let's use 1 token = 2.5 characters or even 2 to be conservative). # 500 characters / 2 = 250 tokens per output. Let's use 200 tokens as average for 450 chars.
# Total output tokens for 1M images = 1,000,000 * 200 = 200,000,000 tokens.
# Models prices per 1M tokens: # Gemini 2.5 Flash-Lite (cheapest): Input $0.10, Output $0.40
# Gemini 2.0 / 1.5 Flash: Input $0.075 - $0.10, Output $0.30 - $0.40
# Gemini 3.1 Flash: Input $0.25, Output $1.50
# Let's calculate for Gemini 1.5 / 2.0 Flash (Input $0.10, Output $0.40 per 1M) input_tokens_m = 268.0 output_tokens_m = 200.0 cost_input_flash = input_tokens_m * 0.10 cost_output_flash = output_tokens_m * 0.40 total_flash = cost_input_flash + cost_output_flash # For Gemini 3.1 Flash-Lite / 2.5 Flash-Lite (Input $0.10, Output $0.40 or lower)
# For Gemini 3.1 Flash (Input $0.25, Output $1.50)
cost_input_31 = input_tokens_m * 0.25
cost_output_31 = output_tokens_m * 1.50
total_31 = cost_input_31 + cost_output_31
print(f"Flash (2.0/1.5): Input ${cost_input_flash}, Output ${cost_output_flash}, Total ${total_flash}"
print(f"Gemini 3.1 Flash: Input ${cost_input_31}, Output ${cost_output_31}, Total ${total_31}")