Gemini pricing: models and monthly cost

Compare Gemini models by real token rates, monthly cost and setup. Prices and model IDs come from the live catalog.

What a working month costs

Computed on gemini-3.8-flash. The example workload is 20M input and 2M output tokens; official and Code By AI prices use the same tokens.

Usage tierInput / output tokensList priceCode By AISaving
Light5M / 500K$5.63$0.5690%
Regular20M / 2M$22.50$2.2590%
Heavy80M / 8M$90.00$9.0090%

Set up Gemini

Export GOOGLE_GEMINI_BASE_URL=https://www.codebyai.net/api/agent and GEMINI_API_KEY, then use model ID gemini-3.8-flash.

export GOOGLE_GEMINI_BASE_URL="https://www.codebyai.net/api/agent"
export GEMINI_API_KEY="sk-proj-xxxx"

Read the Gemini setup guide

Gemini models and token rates

ModelList priceYou pay
gemini-3.8-flashDefault$0.75 / $3.75$0.08 / $0.38
gemini-3.7-flash$1.00 / $3.00$0.10 / $0.30
gemini-3.1-pro-preview$2.00 / $12.00$0.20 / $1.20
gemini-4-argon$2.00 / $10.00$0.20 / $1.00

per 1M tokens (input / output)

FAQ

How much does gemini-3.8-flash cost per month?
For the example month, gemini-3.8-flash costs $22.50 at list price and $2.25 through Code By AI.
Can I use Gemini with the same key?
Yes. One Code By AI key works for Gemini and the other channels. Use the protocol and model ID shown in the guide.
Where do I set up Gemini?
Use the Gemini setup guide linked on this page. It covers the exact config file and model IDs for Gemini.