Gemini API deprecates the temperature, top_p and top_k sampling parameters
Google deprecated the temperature, top_p and top_k sampling parameters on the Gemini API. The changelog gives no removal date; the latest-model guide covers what replaces them.
What does this mean for me?
Plan for it
Engineering leadership
Cost, risk, timeline, team impact Plan for itAnything that relies on tuning Gemini's sampling will need rework before Google removes these parameters. No removal date is set yet, so schedule it rather than rush it.
Engineer
What to change, what breaks, what to test Plan for itFind code setting `temperature`, `top_p` or `top_k` on Gemini API calls and plan to drop them. Read the latest-model guide for the alternative before Google sets a removal date.
General consumer
Using the Gemini app, not the API No impactNothing to do — these are API parameters and do not affect the Gemini app.
The sampling parameters temperature, top_p and top_k are deprecated on the Gemini API, announced alongside the Gemini 3.6 Flash and 3.5 Flash-Lite releases. Deprecated is not yet removed: the changelog gives no date after which requests setting them fail or are ignored, and points to the latest-model guide for the details.
API surface
| Parameter | Change | Breaking | Models |
|---|---|---|---|
temperature | deprecated | no | |
top_p | deprecated | no | |
top_k | deprecated | no |
Terms on this page: Deprecation