All insights

Model APIs

Gemini 3.5 Flash API: Current Status and How to Connect

Google lists Gemini 3.5 Flash as deprecated: requests using its old model ID are routed to Gemini 3.6 Flash. See the direct Gemini API request and which model ID to use now.

Illustration for Gemini 3.5 flash api

Short answer

Gemini 3.5 Flash (gemini-3.5-flash) is a real Google Gemini API model, but Google now marks it deprecated. Google’s model documentation says it is no longer selectable in AI Studio and that API requests using gemini-3.5-flash are automatically routed to gemini-3.6-flash. For a new integration, use the explicit gemini-3.6-flash model ID instead of relying on that redirect. Google identifies Gemini 3.8 Flash as the newer Flash model. (ai.google.dev)

The example below calls Google’s Gemini API directly—not Vertex AI or a third-party gateway. It uses the currently documented generateContent REST pattern with the stable Gemini 3.6 Flash model ID. (ai.google.dev)

Make a direct Gemini API request

  1. Create or manage a Gemini API key in Google AI Studio. Google’s documentation says Gemini API requests require authentication and recommends keeping keys in environment variables rather than embedding them in code. (ai.google.dev)
  2. In a macOS/Linux shell, set the key for your session:
export GEMINI_API_KEY="YOUR_GOOGLE_API_KEY"
  1. Send a text request to Gemini 3.6 Flash:
curl --fail-with-body \
  --request POST \
  --url "https://generativelanguage.googleapis.com/v1beta/models/gemini-3.6-flash:generateContent" \
  --header "x-goog-api-key: $GEMINI_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "contents": [
      {
        "parts": [
          { "text": "Give me a three-item checklist for reviewing an API integration." }
        ]
      }
    ]
  }'

The request is an HTTP POST. The model identifier belongs in the URL; the prompt goes in the JSON body under contents[].parts[].text. The successful response is JSON; read generated text from candidates[0].content.parts[0].text. Google’s current text-generation guide documents this request shape and response pattern. (ai.google.dev)

If your existing code still uses gemini-3.5-flash, it may continue to receive responses because Google says requests are automatically routed to Gemini 3.6 Flash. Change the model string explicitly when you want your integration to name the model it is actually targeting. (ai.google.dev)

API key and production notes

  • Keep the key on a trusted server. Don’t commit it to source control or expose it in browser-side application code. Google recommends environment variables and documents key restrictions and secret-management practices. (ai.google.dev)
  • Check what kind of key your project uses. Google says that, starting May 28, 2026, new keys created in AI Studio are authorization keys by default. It also says unrestricted standard keys are rejected, while standard keys with explicit restrictions continue to work. If authentication fails, check the key’s type and restrictions in your project settings. (ai.google.dev)
  • Don’t mix API routes. The code here uses the Gemini API host, a Google Gemini API key, and Gemini’s generateContent request format. Vertex AI and third-party gateways have their own endpoint, credentials, and setup; their model IDs and instructions are not interchangeable with this example.
  • Choose a model deliberately. Google lists Gemini 3.6 Flash as still available for production use and points to Gemini 3.8 Flash as its newer Flash model. Check the official model page for current status before choosing a model for a new workload. (ai.google.dev)

Frequently asked questions

Is gemini-3.5-flash a valid model ID?

Yes. Google’s model page identifies gemini-3.5-flash, but marks it deprecated and says requests to that ID are automatically routed to gemini-3.6-flash. For new code, use the explicit replacement ID. (ai.google.dev)

Is this a Gemini API or Vertex AI example?

It is a direct Gemini API example: the URL uses generativelanguage.googleapis.com and the key is sent in the x-goog-api-key header. It is not a Vertex AI example. (ai.google.dev)

What if I specifically need Gemini 3.5 Flash behavior?

The documentation says calls using the old ID are routed to Gemini 3.6 Flash, so the ID does not pin requests to the old model. If reproducibility matters, use an explicitly documented available model ID and evaluate its outputs on your own representative prompts before switching production traffic. (ai.google.dev)

Sources

Gemini 3.5 Flash | Gemini API | Google AI for Developers

Gemini 3.6 Flash | Gemini API | Google AI for Developers

Gemini 3.8 Flash | Gemini API | Google AI for Developers

Text generation - generateContent API | Google AI for Developers

Using Gemini API keys - generateContent API | Google AI for Developers

Contact us