Gemini 3 Pro¶
Overview¶
The repo record is named gemini-3-pro-image, but the closest current official model page is Gemini 3 Pro Image Preview. Google describes it as a reasoning-driven, professional-grade image model aimed at complex graphic design, precise editing, strong text rendering, and more grounded outputs. Compared with the Flash image tier, this is the model you would document when quality, precision, and heavier creative control matter more than raw throughput.
API base URL¶
Example payload¶
{
"model": "gemini-3-pro-image",
"contents": [
{
"text": "Generate a polished product visual with soft studio lighting"
}
],
"config": {
"imageConfig": {
"aspectRatio": "1:1",
"imageSize": "2K",
"enhancePrompt": false
}
}
}
Our Current Pricing¶
Gemini image billing is hybrid. The preferred path is token-based when the provider returns token counts, but the code also carries fallback per-image amounts for cases where output token data is missing.
Implemented pricing key for this model family: gemini-3-pro-image-preview.
Preferred formula:
cost_usd =
(tokens_out * output_price_per_1m_tokens / 1_000_000) +
(tokens_in * input_price_per_1m_tokens / 1_000_000)
Fallback behavior applies only when tokensOut is absent or zero. There is a specific fallback row for 4096x4096 -> 0.24 USD; otherwise the default fallback is 0.134 USD. If the pricing key itself is unknown, the final defensive fallback is 0.0025 USD. Final rounding is to 6 decimal places.
The practical billing rule is straightforward. First try to read the usage object and compute cost from tokensIn and tokensOut. If usage is missing, look up the output size you requested or inferred and charge the fallback image amount. That dual strategy is useful because Gemini image responses can be metered precisely when usage is present, but your product still needs a deterministic amount when it is not.