Skip to main content
Watch: I Built an AI App Without Leaving Databricks

Setup guide - Documented by Kilo Code

Use Gemini in Kilo Code

Kilo Code has a built-in google provider: add the key in the VS Code Providers tab, or set GOOGLE_GENERATIVE_AI_API_KEY and a google/<model> default in kilo.json for the CLI.

Last verified 5 steps2 official sources

Steps

  1. Step 1.

    Get an API key from Google AI Studio (https://ai.google.dev/): sign in, click "Create API key", copy it.

  2. Step 2.

    VS Code: Open Settings (gear icon) and go to the Providers tab to add Google Gemini and enter your API key. The extension stores this in your kilo.json config file.

  3. Step 3.

    CLI: set the API key as an environment variable.

    Terminal
    export GOOGLE_GENERATIVE_AI_API_KEY="your-api-key"
  4. Step 4.

    Or configure it in your config file (~/.config/kilo/kilo.json or ./kilo.json).

    JSON
    {
      "provider": {
        "google": {
          "env": ["GOOGLE_GENERATIVE_AI_API_KEY"],
        },
      },
    }
  5. Step 5.

    Then set your default model (Kilo's documented example uses google/gemini-2.5-pro; swap in a current id such as google/gemini-3.8-flash).

    JSON
    {
      "model": "google/gemini-2.5-pro",
    }

Caveats

  • Kilo documents only google/gemini-2.5-pro as an example; the other ids come from Google's models page with the google/ prefix taken from Kilo's documented format.
  • Kilo docs, verbatim: "Google began rejecting unrestricted Standard keys on June 19, 2026. If Gemini returns Request had invalid authentication credentials, open the key in Google AI Studio and check its type and status. Replace a Standard key with a new auth key."
  • Kilo docs: "Google will reject all Standard keys in September 2026."
  • The gemini-embedding-001 model is supported for Kilo codebase indexing.

FAQ

How do I use Gemini in Kilo Code?

Kilo Code has a built-in google provider: add the key in the VS Code Providers tab, or set GOOGLE_GENERATIVE_AI_API_KEY and a google/<model> default in kilo.json for the CLI.

Which Gemini model ids work in Kilo Code?

The official docs read for this guide list gemini-4-argon, gemini-3.8-flash, gemini-3.6-flash, gemini-3.5-flash-lite, gemini-3.1-pro-preview, gemini-2.5-pro and gemini-2.5-flash.

Is this an official Gemini and Kilo Code setup?

Kilo Code documents this setup in its own docs. It was last checked against 2 official pages on October 17, 2026.

Sources

Last verified against 2 official pages.

Newsletter

New models, set up the day they ship

One email per week. New model releases, the coding tools that support them and how to wire them up.