All insights

Model APIs

Gemini 3 Coding: Models, API Access, and How to Choose

A practical guide to Gemini 3 coding models, a documented Python API example, current pricing and limits, and the differences between API, IDE, and agent routes.

Illustration for Gemini 3 coding

Yes—Gemini 3 models support coding, but the right choice depends on the product route and your workload. For a new API evaluation, Google’s Gemini API model page lists Gemini 3.8 Flash (gemini-3.8-flash) as a stable model, with a 1,048,576-token input limit and a 65,536-token output limit. Google’s separate Gemini Enterprise Agent Platform page labels that model GA. Those channel-specific labels are not interchangeable.

As of November 9, 2026, the Gemini API lists Gemini 3.1 Pro as a preview option, while Gemini Code Assist documentation lists different models and access conditions. Availability in one Google product does not establish access in another.

Which Gemini 3 model should you consider for coding?

Model or route What the documentation says Selection implication
Gemini 3.8 Flash API (gemini-3.8-flash) The Gemini API model page lists a stable version and coding-oriented capabilities. It specifies a 1,048,576-token input limit and up to 65,536 output tokens. A reasonable first API model to evaluate. “Stable” describes the Gemini API model listing; the separate Agent Platform documentation labels its channel GA. Neither status guarantees performance on your task.
Gemini 3.1 Pro Preview (gemini-3.1-pro-preview) Google’s model documentation describes it as a preview model. Evaluate it if its reasoning profile is relevant and preview status fits your requirements; don’t treat it as equivalent to a stable API model.
Gemini Code Assist The Code Assist page lists Gemini 3.5 Flash as generally available and Gemini 3.1 Pro as public preview for VS Code and IntelliJ. The preview model requires an administrator to configure the Preview release channel. Consider this route if you want coding assistance inside an editor. Those model and access statements apply to Code Assist, not the standalone Gemini API.

These are availability distinctions, not evidence that one model writes better code than another. Google’s Agent Platform guide reports benchmark results for Gemini 3.8 Flash and 3.7 Flash, including Terminal-bench 2.1 scores of 90.8% and 81.6%, respectively. Treat these as Google-published results for the stated benchmark—not as a guarantee for your repository or a direct comparison of every product route.

Try Gemini 3.8 Flash through the Python API

Google’s current Gemini API quickstart uses the google-genai Python SDK and the Interactions API. It shows GEMINI_API_KEY as the environment variable, client.interactions.create(...) for a request, and interaction.output_text to read the generated text. This is a minimal text-generation example, not a coding agent: it does not give the model repository access, run tests, or apply a patch.

Install the SDK and set an API key in your environment:

pip install -U google-genai
export GEMINI_API_KEY="YOUR_API_KEY"

Then send a coding-related request:

from google import genai

client = genai.Client()
interaction = client.interactions.create(
    model="gemini-3.8-flash",
    input=(
        "Review this change request: add input validation to a signup form. "
        "Suggest a small patch and list tests to run. Do not claim tests were run."
    ),
)

print(interaction.output_text)

Google’s quickstart recommends the Interactions API for new projects. Check the model documentation for the limits and supported capabilities of the particular API or service you plan to use.

API cost and production constraints

For the Gemini Developer API, Google lists Gemini 3.8 Flash at $0.75 per 1 million input tokens and $3.75 per 1 million output tokens through December 31, 2026. The listed standard rates become $1.50 per 1 million input tokens and $7.50 per 1 million output tokens on January 1, 2027. Longer, complex agent tasks can use more tokens, so a coding workflow’s cost depends on its actual requests and outputs—not just the model’s per-token rates.

The model page lists a 1,048,576-token input limit and 65,536-token output limit. API quotas are separate from those model limits: Google says request-per-minute, input-tokens-per-minute, and requests-per-day limits apply per project and vary by model and usage tier. Check the active limits for your project in AI Studio rather than assuming a fixed quota.

Google’s Gemini Developer API pricing page distinguishes data-use terms by tier: it says free-tier content may be used to improve Google products, while paid-tier content is not used for that purpose. Review the current terms that apply to your account and service before submitting private or proprietary code. Confirm current pricing, billing setup, and quotas before a production launch.

API, IDE assistant, or coding agent?

  • Use the Gemini API when your application needs to send code or a coding request to a model and handle the response itself. A basic API request returns generated text; your application controls what context and tools it supplies.
  • Use Gemini Code Assist for IDE-integrated coding help. Its documentation lists Gemini 3.5 Flash and Gemini 3.1 Pro Preview for VS Code and IntelliJ, with the preview model requiring administrator configuration. Google says new Standard and Enterprise subscriptions stopped being available for purchase on October 9, 2026. Check the current terms for any existing subscription rather than assuming renewal or continued availability.
  • For consumer Gemini Code Assist or Gemini CLI access, Google says those products stopped serving requests for Gemini Code Assist for individuals, Google AI Pro, and Google AI Ultra on June 18, 2026. The notice points affected consumer users to the Antigravity product family; it does not make those former entitlements equivalent to API access. Google’s documentation describes a separate managed Antigravity agent built with Gemini 3.8 Flash and says its underlying model can be configured. That description is specific to the managed API agent; check the relevant product and plan before choosing an Antigravity route.

How to evaluate Gemini 3 for your coding work

Google’s product descriptions and benchmark results are useful evidence about intended use and selected evaluations. They don’t settle how well a model will handle your codebase, conventions, or constraints. Run a small, repeatable test with your own representative work before committing.

  1. Choose representative tasks: a bug fix with a failing test, a small multi-file change, a constrained refactor, and a code-review task.
  2. Give each candidate the same task description, repository context, tools, and test conditions. Record the exact model ID and route.
  3. Compare test results and patch correctness, instruction adherence, unnecessary changes, and human editing time. Track latency and API spend if they matter to your deployment.
  4. Include a task where the model must explain or plan without editing. Check whether it follows that instruction.
  5. Keep an engineer responsible for reviewing changes before they are merged or deployed.

Bottom line: Gemini 3.8 Flash is a documented stable Gemini API model to test for coding; the separate Agent Platform documentation labels it GA. Gemini 3.1 Pro Preview is another option to evaluate when preview status is acceptable. Choose based on results with your actual tasks, and keep API access, IDE subscriptions, and agent-product access distinct.

Sources

Gemini 3.8 Flash | Gemini API

Gemini 3.8 Flash | Gemini Enterprise Agent Platform

Developer's guide to Gemini 3.8 Flash

Gemini 3.1 Pro Preview | Gemini API

Getting started | Gemini API

What's new in Gemini 3.8 Flash

Gemini Developer API pricing

Billing | Gemini API

Rate limits | Gemini API

Gemini 3 in Gemini Code Assist

Gemini Code Assist Standard and Enterprise subscriptions

Gemini Code Assist consumer accounts

Antigravity agent | Gemini API

Contact us