Best Gemini model for code
For code with Gemini, use 3.8 Flash at medium effort.
3.8 Flash at medium effort
Medium effortgeneration_config.thinking_level = medium
The strongest Google model for code that you can use today. Beats 3.1 Pro on coding tests at about a third of the price. Intro pricing ends Dec 31, then it doubles to $1.50 / $7.50.
How it compares
Prices are in US dollars per million tokens, input then output. 3.8 Flash costs $0.75 / $3.75.
| Model | Price | Against the pick |
|---|---|---|
| ArgonRolling out | $2 / $10 | Google's newest model, still rolling out. It can't be the pick until it's broadly available. |
| 3.1 ProPreview | $2 / $12 | Older (Feb), about 3x the price, and behind 3.8 Flash on coding. |
| 3.5 Flash-Lite | $0.30 / $2.50 | Built for bulk tasks and a poor fit for code. |
Setting it in the API
In an API request, set the model and effort like this:
model: "gemini-3.8-flash", generation_config: { thinking_level: "medium" }![]()
Maintained by the AI team at Vegan Hacktivists
Prices are per million tokens, input / output. We pick for the best result per dollar, so a pricier model can score higher and still lose out. This pick last changed Oct 9, 2026. Sources: Anthropic docs, OpenAI docs, Gemini docs, Artificial Analysis, Vals AI.Last checked Oct 12, 2026.
Other picks
Gemini for everyday work, research, agents and automations.
Other labs for code: Claude, OpenAI.
Open the interactive picker to switch between labs and tasks.
Want helpputting this to work?
Vegan Hacktivists offers free AI and automation support to animal protection organizations — from a first conversation to a full build.

