Neuestes Modell Andere Modelle
Gemini 3.8 Flash (gemini-3.8-flash) ist unser intelligentestes Flash-Modell, das für langfristige Softwareentwicklung, autonome KI-Agenten und komplexe Unternehmensworkflows entwickelt wurde.
In dieser Anleitung erfährst du, was es Neues in Gemini 3.8 Flash gibt, welche API-Änderungen vorgenommen wurden und erhältst Codebeispiele und Migrationshinweise.
Neues Modell
| Modell | Modell-ID | Standardmäßiger Denkaufwand | Preise | Beschreibung |
|---|---|---|---|---|
| Gemini 3.8 Flash | gemini-3.8-flash |
medium |
3.8 Flash ist bis zum Jahresende zum Einführungspreis von 0,75 $/1 Mio. Eingabetokens und 3,75 $/1 Mio. Ausgabetokens verfügbar. Weitere Informationen findest du unter Preise. | Unser intelligentestes Flash-Modell, das für langfristige Softwareentwicklung, autonome KI-Agenten und komplexe Unternehmensworkflows entwickelt wurde. |
Gemini 3.8 Flash unterstützt ein Kontextfenster von 1 Mio. Tokens, maximal 64.000 Ausgabetokens, anpassbare Denkaufwände (low, medium, high) und dieselbe umfassende Suite integrierter Tools.
Die vollständigen Spezifikationen findest du auf der Modellseite zu Gemini 3.8 Flash. Details zu den Einführungspreisen findest du weiter unten auf dieser Seite im Abschnitt Preise oder auf der Preisseite.
Kurzanleitung
Python
from google import genai
client = genai.Client()
interaction = client.interactions.create(
model="gemini-3.8-flash",
input="Write a three.js script that renders a realistic 3D black hole."
)
print(interaction.output_text)
JavaScript
import { GoogleGenAI } from "@google/genai";
const client = new GoogleGenAI({});
const interaction = await client.interactions.create({
model: "gemini-3.8-flash",
input: "Write a three.js script that renders a realistic 3D black hole.",
});
console.log(interaction.output_text);
Java
import com.google.genai.Client;
import com.google.genai.gaos.models.interactions.CreateModelInteraction;
import com.google.genai.gaos.models.interactions.Interaction;
import com.google.genai.gaos.models.interactions.InteractionsInput;
import com.google.genai.gaos.models.interactions.Model;
import com.google.genai.gaos.models.operations.CreateInteractionRequestBody;
Client client = new Client();
CreateModelInteraction params =
CreateModelInteraction.builder()
.model(Model.of("gemini-3.8-flash"))
.input(
InteractionsInput.of(
"Write a three.js script that renders a realistic 3D black hole."))
.build();
Interaction interaction =
client.interactions.create(CreateInteractionRequestBody.of(params)).interaction().get();
System.out.println(interaction.outputText().orElse(""));
Go
package main
import (
"context"
"fmt"
"log"
"google.golang.org/genai"
"google.golang.org/genai/interactions/models/interactions"
"google.golang.org/genai/interactions/models/operations"
)
func main() {
ctx := context.Background()
client, err := genai.NewClient(ctx, nil)
if err != nil {
log.Fatal(err)
}
res, err := client.Interactions.Create(ctx, operations.CreateInteractionRequest{
Body: operations.NewCreateInteractionRequestBody(interactions.CreateModelInteraction{
Model: interactions.Model("gemini-3.8-flash"),
Input: interactions.NewInteractionsInput("Write a three.js script that renders a realistic 3D black hole."),
}),
})
if err != nil {
log.Fatal(err)
}
if res.Interaction.OutputText != nil {
fmt.Println(*res.Interaction.OutputText)
}
}
REST
curl "https://generativelanguage.googleapis.com/v1beta/interactions" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H 'Content-Type: application/json' \
-X POST \
-d '{
"model": "gemini-3.8-flash",
"input": "Write a three.js script that renders a realistic 3D black hole."
}'
Neuerungen in Gemini 3.8 Flash
- Langfristige Softwareentwicklung:Liefert gute Ergebnisse bei realen Coding-Benchmarks, komplexem Refactoring mehrerer Dateien und deterministischer Toolausführung. Weitere Informationen findest du unter Bewertungsmethodik.
- Autonome KI-Agenten:Ermöglicht das Erstellen robuster mehrstufiger Workflows für die Planung und Tool-Orchestrierung, wodurch fehlgeschlagene Schleifen und Fehler erheblich reduziert werden.
- Komplexe Unternehmensworkflows:Bietet eine höhere Genauigkeit, tiefgreifende Schlussfolgerungen und eine hohe faktische Strenge bei anspruchsvollen Aufgaben in bestimmten Bereichen und großen Datenpipelines.
- Standardmodell für verwaltete KI-Agenten: Der Standard-KI-Agent für verwaltete KI-Agenten, der Antigravity-Agent, verwendet jetzt Gemini 3.8 Flash. Das Antigravity SDK verwendet standardmäßig auch Gemini 3.8 Flash.
- Einführungspreise:Gemini 3.8 Flash ist bis zum 31. Dezember 2026 zum Einführungspreis von 0,75 $/1 Mio. Eingabetokens und 3,75 $/1 Mio. Ausgabetokens verfügbar. Die Standardpreise von 1,50 $/1 Mio. Eingabetokens und 7,50 $/1 Mio. Ausgabetokens gelten ab dem 1. Januar 2027.
Gemini 3.8 Flash kann bei längeren und komplexen Aufgaben mehr Tokens verwenden. Um bei schwierigen, mehrstufigen Zielen qualitativ hochwertigere Ergebnisse zu erzielen, führt das Modell kleinere Schlussfolgerungsschritte aus, ruft Tools iterativ auf und überprüft seine Arbeit während des Prozesses. Nicht für jeden Workflow ist diese Überprüfungsebene erforderlich. Bei alltäglichen Aufgaben kannst du den Denkaufwand reduzieren, um den Tokenverbrauch zu senken. Alternativ wird Gemini 3.6 Flash weiterhin unterstützt.
Denkaufwände
Mit Gemini 3.8 Flash kannst du die Latenz und Intelligenz flexibel steuern, indem du den Denkaufwand des Modells anpasst:
- Geringer Denkaufwand: Reduziert die Zeit bis zur Antwort bei latenzkritischen Aufgaben wie Pipelines zur Reaktion auf Vorfälle, Echtzeit-Chats, dem Verfassen von Entwürfen und der schnellen Datenanalyse.
- Mittel (Standard) : Beste Qualität für die meisten Aufgaben. Empfohlen für komplexe Code- und agentische Anwendungsfälle, da eine höhere Genauigkeit beim ersten Durchlauf erzielt wird.
- Hoher Denkaufwand: Maximiert die Schlussfolgerungs- und Tool-Orchestrierungsfunktionen des Modells. Optimal für tiefgreifende Schlussfolgerungen, Mathematik und schwierige mehrstufige Aufgaben.
Im folgenden Beispiel wird thinking_level für eine komplexe Codeanalyseanfrage auf medium gesetzt:
Python
from google import genai
client = genai.Client()
interaction = client.interactions.create(
model="gemini-3.8-flash",
input="Analyze this payment processing pipeline for race conditions during retry attempts and rewrite the transaction locks safely.",
generation_config={
"thinking_level": "medium" # Balanced reasoning effort for complex tasks
}
)
print(interaction.output_text)
JavaScript
import { GoogleGenAI } from "@google/genai";
const client = new GoogleGenAI({});
const interaction = await client.interactions.create({
model: "gemini-3.8-flash",
input: "Analyze this payment processing pipeline for race conditions during retry attempts and rewrite the transaction locks safely.",
generation_config: {
thinking_level: "medium"
}
});
console.log(interaction.output_text);
Java
import com.google.genai.Client;
import com.google.genai.gaos.models.interactions.CreateModelInteraction;
import com.google.genai.gaos.models.interactions.GenerationConfig;
import com.google.genai.gaos.models.interactions.Interaction;
import com.google.genai.gaos.models.interactions.InteractionsInput;
import com.google.genai.gaos.models.interactions.Model;
import com.google.genai.gaos.models.interactions.ThinkingLevel;
import com.google.genai.gaos.models.operations.CreateInteractionRequestBody;
Client client = new Client();
CreateModelInteraction params =
CreateModelInteraction.builder()
.model(Model.of("gemini-3.8-flash"))
.input(
InteractionsInput.of(
"Analyze this payment processing pipeline for race conditions during retry attempts and rewrite the transaction locks safely."))
.generationConfig(
GenerationConfig.builder()
.thinkingLevel(ThinkingLevel.MEDIUM) // Balanced reasoning effort for complex tasks
.build())
.build();
Interaction interaction =
client.interactions.create(CreateInteractionRequestBody.of(params)).interaction().get();
System.out.println(interaction.outputText().orElse(""));
Go
package main
import (
"context"
"fmt"
"log"
"google.golang.org/genai"
"google.golang.org/genai/interactions/models/interactions"
"google.golang.org/genai/interactions/models/operations"
)
func main() {
ctx := context.Background()
client, err := genai.NewClient(ctx, nil)
if err != nil {
log.Fatal(err)
}
res, err := client.Interactions.Create(ctx, operations.CreateInteractionRequest{
Body: operations.NewCreateInteractionRequestBody(interactions.CreateModelInteraction{
Model: interactions.Model("gemini-3.8-flash"),
Input: interactions.NewInteractionsInput("Analyze this payment processing pipeline for race conditions during retry attempts and rewrite the transaction locks safely."),
GenerationConfig: &interactions.GenerationConfig{
ThinkingLevel: interactions.ThinkingLevelMedium.ToPointer(), // Balanced reasoning effort for complex tasks
},
}),
})
if err != nil {
log.Fatal(err)
}
if res.Interaction.OutputText != nil {
fmt.Println(*res.Interaction.OutputText)
}
}
REST
curl "https://generativelanguage.googleapis.com/v1beta/interactions" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H 'Content-Type: application/json' \
-X POST \
-d '{
"model": "gemini-3.8-flash",
"input": "Analyze this payment processing pipeline for race conditions during retry attempts and rewrite the transaction locks safely.",
"generation_config": {
"thinking_level": "medium"
}
}'
Aktualisierter Antigravity-Agent
Aufgrund seiner verbesserten Leistung und Schlussfolgerungsfähigkeit wird der Antigravity-Agent in Gemini Managed Agents jetzt standardmäßig mit Gemini 3.8 Flash erstellt.
Python
from google import genai
client = genai.Client()
interaction = client.interactions.create(
agent="antigravity-preview-09-2026",
input=(
"Audit https://web.dev for performance, Core Web Vitals, and SEO. "
"Query Google's PageSpeed Insights API for both Mobile and Desktop strategies. "
"Check search indexing with Google Search for site:web.dev. "
"Format the output as a side-by-side scorecard table with prioritized fixes."
),
environment="remote",
)
print(interaction.output_text)
JavaScript
import { GoogleGenAI } from "@google/genai";
const client = new GoogleGenAI({});
const interaction = await client.interactions.create({
agent: "antigravity-preview-09-2026",
input: "Audit https://web.dev for performance, Core Web Vitals, and SEO. Query Google's PageSpeed Insights API for both Mobile and Desktop strategies. Check search indexing with Google Search for site:web.dev. Format the output as a side-by-side scorecard table with prioritized fixes.",
environment: "remote",
}, { timeout: 300000 });
console.log(interaction.output_text);
Java
import com.google.genai.Client;
import com.google.genai.gaos.models.interactions.AgentOption;
import com.google.genai.gaos.models.interactions.CreateAgentInteraction;
import com.google.genai.gaos.models.interactions.CreateAgentInteractionEnvironment;
import com.google.genai.gaos.models.interactions.Interaction;
import com.google.genai.gaos.models.interactions.InteractionsInput;
import com.google.genai.gaos.models.operations.CreateInteractionRequestBody;
Client client = new Client();
CreateAgentInteraction params =
CreateAgentInteraction.builder()
.agent(AgentOption.of("antigravity-preview-09-2026"))
.input(
InteractionsInput.of(
"Audit https://web.dev for performance, Core Web Vitals, and SEO. "
+ "Query Google's PageSpeed Insights API for both Mobile and Desktop strategies. "
+ "Check search indexing with Google Search for site:web.dev. "
+ "Format the output as a side-by-side scorecard table with prioritized fixes."))
.environment(CreateAgentInteractionEnvironment.of("remote"))
.build();
Interaction interaction =
client.interactions.create(CreateInteractionRequestBody.of(params)).interaction().get();
System.out.println(interaction.outputText().orElse(""));
Go
package main
import (
"context"
"fmt"
"log"
"google.golang.org/genai"
"google.golang.org/genai/interactions/models/interactions"
"google.golang.org/genai/interactions/models/operations"
)
func main() {
ctx := context.Background()
client, err := genai.NewClient(ctx, nil)
if err != nil {
log.Fatal(err)
}
res, err := client.Interactions.Create(ctx, operations.CreateInteractionRequest{
Body: operations.NewCreateInteractionRequestBody(interactions.CreateAgentInteraction{
Agent: interactions.AgentOption("antigravity-preview-09-2026"),
Input: interactions.NewInteractionsInput(
"Audit https://web.dev for performance, Core Web Vitals, and SEO. " +
"Query Google's PageSpeed Insights API for both Mobile and Desktop strategies. " +
"Check search indexing with Google Search for site:web.dev. " +
"Format the output as a side-by-side scorecard table with prioritized fixes.",
),
Environment: genai.Ptr(interactions.NewCreateAgentInteractionEnvironment("remote")),
}),
})
if err != nil {
log.Fatal(err)
}
if res.Interaction.OutputText != nil {
fmt.Println(*res.Interaction.OutputText)
}
}
REST
curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions" \
-H "Content-Type: application/json" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-d '{
"agent": "antigravity-preview-09-2026",
"input": "Audit https://web.dev for performance, Core Web Vitals, and SEO. Query Google'\''s PageSpeed Insights API for both Mobile and Desktop strategies. Check search indexing with Google Search for site:web.dev. Format the output as a side-by-side scorecard table with prioritized fixes.",
"environment": "remote"
}'
Das zugrunde liegende Gemini-Modell kann konfiguriert werden mit agent_config.
Checkliste für die Migration
`/gemini-api-dev migrate my app to Gemini 3.8 Flash`
Zu gemini-3.8-flash migrieren
- Modell-ID aktualisieren:Ändere die Zielmodell-String in
gemini-3.8-flash. - Denkaufwand konfigurieren:Ersetze
thinking_budgetdurch die String-Enumthinking_level. Beachte, dassminimalin Gemini 3.8 Flash nicht unterstützt wird. Wählelow,medium(Standard) oderhighaus. - Änderungen an den Gemini 3 API-Parametern anwenden:Entferne veraltete Sampling-Parameter (
temperature,top_p,top_k),candidate_count(in Gemini 3 und höher nicht unterstützt) und vorgefertigte Modell-Turns. Weitere Informationen findest du unter Änderungen an der Gemini 3.6 API und Parameteraktualisierungen. - Regeln für die Turn-Validierung erzwingen:Standardisiere mehrstufige Unterhaltungen auf serverseitigem
previous_interaction_idund entferne vorgefertigte Modell-Turns. - Funktionsaufrufe prüfen
- Platziere multimodale Assets in der Antwortnutzlast.
- Formatiere Inline-Anweisungen mit
\n\n. - Wenn
Malformed_Function_CallFehler im Zusammenhang mit Text vor dem Tool auftreten, findest du unter Problemumgehungen für Anforderungen an Text vor dem Tool weitere Informationen. - Nur bei Verwendung der generateContent API: Stelle sicher, dass alle
FunctionResponse-Objektecall_idundnameenthalten.
- Gemini 3-Mindestanforderungen: Informationen zu SDK-Updates und zur Beibehaltung der Thought-Signatur findest du unter Thought-Signaturen.
Preise
Bis zum 31. Dezember 2026 gelten für Gemini 3.8 Flash und Gemini 3.6 Flash Einführungspreise für Google AI Studio und die Gemini Enterprise Agent Platform. Die Standardpreise gelten ab dem 1. Januar 2027. Die vollständigen Preisstufen findest du auf der Preisseite.
Andere Modelle
Nächste Schritte
- Sieh dir die API-Spezifikationen in der Modellübersicht an.
- Weitere Informationen zur Orchestrierung mehrerer KI-Agenten findest du in der Übersicht zur Interactions API.
- Teste und optimiere Prompts in Google AI Studio.