Gemini 3.8 Flash, Google's most capable Flash model for long-horizon coding and agents, became generally available on 2026-09-02.
Prerequisites
A Gemini API key in GEMINI_API_KEY
The @google/genai package (npm install @google/genai)
Steps
Use the model ID gemini-3.8-flash. It accepts text, images, video, audio and PDFs (up to 1,048,576 input tokens) and returns text (up to 65,536 tokens), with function calling, structured outputs, code execution and low/medium/high thinking.
Create flash.mjs:
javascript
import { GoogleGenAI } from "@google/genai";const ai = new GoogleGenAI({});const interaction = await ai.interactions.create({ model: "gemini-3.8-flash", input: "Explain how AI works in a few words",});console.log(interaction.output_text);
Test it
Run node flash.mjs. You should see a short explanation printed from gemini-3.8-flash.