Gemini 3.8 Flash (gemini-3.8-flash) अब सामान्य रूप से उपलब्ध है. इसका इस्तेमाल ऐप्लिकेशन बनाने के लिए किया जा सकता है. यह हमारा सबसे स्मार्ट फ़्लैश मॉडल है. इसे लंबे समय तक चलने वाली सॉफ़्टवेयर इंजीनियरिंग, ऑटोनॉमस एजेंट, और मुश्किल एंटरप्राइज़ वर्कफ़्लो के लिए बनाया गया है.
इस गाइड में, Gemini 3.8 Flash में नया क्या है, एपीआई में हुए बदलाव, कोड के उदाहरण, और माइग्रेशन से जुड़ी जानकारी दी गई है.
नया मॉडल
| मॉडल | मॉडल आईडी | सोचने का डिफ़ॉल्ट लेवल | कीमत | ब्यौरा |
|---|---|---|---|---|
| Gemini 3.8 Flash | gemini-3.8-flash |
medium |
3.8 Flash, साल के आखिर तक उपलब्ध है. इसकी शुरुआती कीमत, 0.75 डॉलर/10 लाख इनपुट टोकन और 3.75 डॉलर/10 लाख आउटपुट टोकन है. ज़्यादा जानकारी के लिए, कीमत देखें. | यह हमारा सबसे स्मार्ट फ़्लैश मॉडल है. इसे लंबे समय तक चलने वाली सॉफ़्टवेयर इंजीनियरिंग, ऑटोनॉमस एजेंट, और एंटरप्राइज़ के मुश्किल वर्कफ़्लो के लिए बनाया गया है. |
Gemini 3.8 Flash में 10 लाख टोकन वाली कॉन्टेक्स्ट विंडो, ज़्यादा से ज़्यादा 64 हज़ार आउटपुट टोकन, और सोच-समझकर जवाब देने के लिए ट्यून किए जा सकने वाले लेवल (low, medium, high) की सुविधा मिलती है. साथ ही, इसमें पहले से मौजूद टूल का पूरा सुइट भी मिलता है.
पूरी जानकारी के लिए, Gemini 3.8 Flash मॉडल का पेज देखें. इंट्रोडक्ट्री कीमत के बारे में जानकारी के लिए, यहां दिया गया कीमत वाला सेक्शन देखें या कीमत वाला पेज देखें.
क्विकस्टार्ट
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(""));
ऐप पर जाएं
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."
}'
Gemini 3.8 Flash में नया क्या है
- लंबे समय तक चलने वाली सॉफ़्टवेयर इंजीनियरिंग: यह कोडिंग के असल बेंचमार्क, कई फ़ाइलों को फिर से व्यवस्थित करने, और टूल को तय तरीके से इस्तेमाल करने के मामले में बेहतर नतीजे देता है. ज़्यादा जानकारी के लिए, आकलन करने का तरीका देखें.
- ऑटोनॉमस एजेंट: इसकी मदद से, कई चरणों वाली प्लानिंग और टूल ऑर्केस्ट्रेशन के वर्कफ़्लो बनाए जा सकते हैं. इससे, लूप और गड़बड़ियों की संख्या में काफ़ी कमी आती है.
- जटिल एंटरप्राइज़ वर्कफ़्लो: यह मॉडल, मुश्किल डोमेन टास्क और बड़े पैमाने पर डेटा पाइपलाइन के लिए, ज़्यादा सटीक नतीजे देता है. साथ ही, यह बेहतर तरीके से तर्क देता है और तथ्यों के आधार पर सटीक जानकारी देता है.
- मैनेज किए गए एजेंट बनाने और मैनेज करने की सुविधा के लिए डिफ़ॉल्ट मॉडल: मैनेज किए गए एजेंट बनाने और मैनेज करने की सुविधा के लिए डिफ़ॉल्ट एजेंट: Antigravity एजेंट, अब Gemini 3.8 Flash का इस्तेमाल करता है. Antigravity SDK भी डिफ़ॉल्ट रूप से Gemini 3.8 Flash का इस्तेमाल करता है.
- शुरुआती कीमत: Gemini 3.8 Flash, 31 दिसंबर, 2026 तक शुरुआती कीमत पर उपलब्ध है. इसके लिए, इनपुट टोकन की कीमत 0.75 डॉलर/मिलियन और आउटपुट टोकन की कीमत 3.75 डॉलर/मिलियन है. इनपुट टोकन के लिए 1.50 डॉलर/मिलियन और आउटपुट टोकन के लिए 7.50 डॉलर/मिलियन की स्टैंडर्ड कीमत 1 जनवरी, 2027 से लागू होगी.
Gemini 3.8 Flash को इस तरह से डिज़ाइन किया गया है कि यह लंबे समय तक चलने वाले और मुश्किल कामों के लिए, ज़्यादा टोकन का इस्तेमाल कर सकता है. मुश्किल और कई चरणों वाले लक्ष्यों के लिए, मॉडल बेहतर क्वालिटी के नतीजे देता है. इसके लिए, मॉडल छोटे-छोटे चरणों में गहराई से विश्लेषण करता है, टूल को बार-बार कॉल करता है, और साथ ही अपने काम की पुष्टि करता है. हर वर्कफ़्लो के लिए, पुष्टि के इस लेवल की ज़रूरत नहीं होती. रोज़मर्रा के कामों के लिए, टोकन की खपत कम करने के लिए, तर्क की कोशिश को कम किया जा सकता है. इसके अलावा, Gemini 3.7 Flash का इस्तेमाल किया जा सकता है.
रीज़निंग के लेवल के बारे में जानकारी
Gemini 3.8 Flash, मॉडल के सोचने के लेवल में बदलाव करके, आपको लेटेन्सी और इंटेलिजेंस पर बेहतर कंट्रोल देता है:
- सोचने में कम समय लगता है: इससे, इंतज़ार का समय कम हो जाता है. जैसे, किसी घटना पर तुरंत प्रतिक्रिया देने से जुड़ी पाइपलाइन, रीयल-टाइम चैट, ड्राफ़्ट लिखना, और डेटा का तुरंत विश्लेषण करना.
- मीडियम (डिफ़ॉल्ट): ज़्यादातर कामों के लिए सबसे अच्छी क्वालिटी. इसका सुझाव, जटिल कोड और एजेंट के तौर पर इस्तेमाल किए जाने वाले मामलों के लिए दिया जाता है. इससे पहली बार में ही ज़्यादा सटीक जवाब मिलता है.
- ज़्यादा सोच-विचार: इससे मॉडल को तर्क करने और टूल को व्यवस्थित करने की ज़्यादा क्षमता मिलती है. गहराई से विश्लेषण, गणित, और कई चरणों वाले मुश्किल टास्क के लिए सबसे सही मॉडल.
यहां दिए गए उदाहरण में, कोड के मुश्किल विश्लेषण के अनुरोध के लिए thinking_level को medium पर सेट किया गया है:
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(""));
ऐप पर जाएं
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"
}
}'
Antigravity एजेंट को अपडेट किया गया
बेहतर परफ़ॉर्मेंस और तर्क देने की क्षमता की वजह से, Gemini Managed Agents में मौजूद Antigravity एजेंट अब डिफ़ॉल्ट रूप से Gemini 3.8 Flash के साथ काम करता है.
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(""));
ऐप पर जाएं
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"
}'
agent_config का इस्तेमाल करके, Gemini के मॉडल को कॉन्फ़िगर किया जा सकता है.
माइग्रेशन की चेकलिस्ट
`/gemini-api-dev migrate my app to Gemini 3.8 Flash`
gemini-3.8-flash पर माइग्रेट करना
- मॉडल आईडी अपडेट करें: अपने टारगेट मॉडल स्ट्रिंग को
gemini-3.8-flashमें बदलें. - सैंपलिंग के ऐसे पैरामीटर हटाएं जिनका इस्तेमाल अब नहीं किया जाता:
- जनरेशन कॉन्फ़िगरेशन से
temperature,top_p, औरtop_kहटाएं. thinking_budgetको स्ट्रिंग enumthinking_levelसे बदलें. ध्यान दें किminimal, 3.8 Flash पर काम नहीं करता.candidate_countको हटाएं. यह सुविधा Gemini 3 और इसके बाद के वर्शन में काम नहीं करती.
- जनरेशन कॉन्फ़िगरेशन से
- टर्न की पुष्टि करने वाले नियमों को लागू करें:
- सर्वर-साइड पर, सिलसिलेवार बातचीत को स्टैंडर्ड बनाएं
previous_interaction_id. - पहले से भरे गए मॉडल के जवाबों को हटाना.
- सर्वर-साइड पर, सिलसिलेवार बातचीत को स्टैंडर्ड बनाएं
- फ़ंक्शन कॉल की ऑडिटिंग:
- जवाब के पेलोड में मल्टीमॉडल ऐसेट रखें.
- इनलाइन निर्देशों को
\n\nका इस्तेमाल करके फ़ॉर्मैट करें. - अगर आपको टूल से पहले के टेक्स्ट से जुड़ी
Malformed_Function_Callगड़बड़ियां दिखती हैं, तो टूल से पहले के टेक्स्ट की ज़रूरी शर्तों को पूरा करने के तरीके देखें. - सिर्फ़ generateContent API का इस्तेमाल करने पर: पक्का करें कि सभी
FunctionResponseऑब्जेक्ट मेंcall_idऔरnameशामिल हों.
- Gemini 3 की बुनियादी ज़रूरतें: एसडीके अपडेट और थॉट सिग्नेचर को सुरक्षित रखने के लिए, Gemini 3.5 पर माइग्रेट करने से पहले की जाने वाली कार्रवाइयों की सूची देखें.
कीमत
Gemini 3.8 Flash, Gemini 3.7 Flash, और Gemini 3.6 Flash के लिए, 31 दिसंबर, 2026 तक Google AI Studio और Gemini Enterprise के एजेंट प्लैटफ़ॉर्म पर शुरुआती कीमत का फ़ायदा लें. सामान्य कीमत 1 जनवरी, 2027 से लागू होगी. कीमत के सभी टियर देखने के लिए, कीमत तय करने से जुड़ा पेज देखें.
अगले चरण
- मॉडल की खास जानकारी में जाकर, एपीआई की खास बातें देखें.
- Interactions API के बारे में खास जानकारी में, एक से ज़्यादा एजेंट को मैनेज करने की सुविधा के बारे में जानें.
- Google AI Studio में प्रॉम्प्ट को टेस्ट करें और उन्हें बेहतर बनाएं.