Gemini API, Gemini, Veo, Nano Banana वगैरह के साथ प्रॉम्प्ट से प्रोडक्शन तक पहुंचने का सबसे तेज़ तरीका है. इसकी मदद से, इन जनरेटिव मॉडल को अपने ऐप्लिकेशन में इंटिग्रेट किया जा सकता है. इससे जनरेट किया गया टेक्स्ट और इमेज जनरेट करने, टेक्स्ट, इमेज वग़ैरह को प्रोसेस करने वाले इनपुट का विश्लेषण करने, और बातचीत करने वाले एजेंट बनाने में मदद मिलती है.
Python
from google import genai
client = genai.Client()
interaction = client.interactions.create(
model="gemini-3.8-flash",
input="Explain how AI works in a few words"
)
print(interaction.output_text)
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);
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("Explain how AI works in a few words"))
.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("Explain how AI works in a few words"),
}),
})
if err != nil {
log.Fatal(err)
}
if res.Interaction.OutputText != nil {
fmt.Println(*res.Interaction.OutputText)
}
}
आराम का समय
curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "gemini-3.8-flash",
"input": "Explain how AI works in a few words"
}'
मॉडल के बारे में जानकारी
सभी देखेंGemini 4 Argon नया
यह गहराई से विश्लेषण करने वाला हमारा बेहतरीन मॉडल है. यह 10 लाख टोकन वाली शेयर की गई कॉन्टेक्स्ट विंडो के साथ उपलब्ध है. साथ ही, यह 10 लाख टोकन तक के लंबे डिकोड कर सकता है.
Gemini 3.8 Flash नया
हमारा बेहतरीन Flash मॉडल, जिसे लंबे समय तक चलने वाले सॉफ़्टवेयर इंजीनियरिंग प्रोजेक्ट, ऑटोनॉमस एजेंट, और एंटरप्राइज़ के मुश्किल वर्कफ़्लो के लिए डिज़ाइन किया गया है.
Gemini 3.8 Flash टीटीएस नया
स्टूडियो-ग्रेड का टेक्स्ट-टू-स्पीच मॉडल, जिसमें एक्सप्रेशन के साथ ऐक्टिंग, कस्टम वॉइस डिज़ाइन, और वॉइस रेप्लिकेशन की सुविधा होती है.
Gemini 3.5 Flash-Lite
ज़्यादा वॉल्यूम वाला, कीमत के हिसाब से संवेदनशील मॉडल. इसे कम समय में ज़्यादा थ्रूपुट वाले सब-एजेंट के टास्क के लिए ऑप्टिमाइज़ किया गया है.
Nano Banana
इमेज जनरेट करने और उनमें बदलाव करने वाले बेहतरीन मॉडल.
Gemini Omni Flash
वीडियो जनरेट करने और उनमें बदलाव करने वाला हमारा बेहतरीन मॉडल.
Gemini 3.5 Transcribe नया
बोली को लिखाई में बदलने वाला कम इंतज़ार का मॉडल. इसमें बोली के आधार पर भाषा की पहचान करने, स्पीकर डायराइज़ेशन, और शब्द के टाइमस्टैंप की सुविधा शामिल है.
Gemini Robotics
यह एक विज़न-लैंग्वेज मॉडल (वीएलएम) है. यह रोबोटिक्स में Gemini की एजेंटिक एआई की सुविधाओं को शामिल करता है. साथ ही, असल दुनिया में ऐडवांस रीज़निंग की सुविधा देता है.
सुविधाओं के बारे में जानें
इमेज जनरेट करने की सुविधा
Nano Banana की मदद से, कॉन्टेक्स्ट के हिसाब से इमेज जनरेट करें और उनमें बदलाव करें.
ज़्यादा कॉन्टेक्स्ट वाली विंडो
Gemini मॉडल में लाखों टोकन इनपुट करें. साथ ही, बिना किसी स्ट्रक्चर वाली इमेज, वीडियो, और दस्तावेज़ों को समझें.
स्ट्रक्चर्ड आउटपुट
Gemini को सिर्फ़ JSON फ़ॉर्मैट में जवाब देने के लिए कहें. यह स्ट्रक्चर्ड डेटा फ़ॉर्मैट, अपने-आप प्रोसेस होने के लिए सही है.
फ़ंक्शन कॉलिंग
Gemini को बाहरी एपीआई और टूल से कनेक्ट करके, एजेंटिक वर्कफ़्लो बनाएं.
Veo 3.1 की मदद से वीडियो जनरेट करना
हमारे बेहतरीन मॉडल की मदद से, टेक्स्ट या इमेज प्रॉम्प्ट का इस्तेमाल करके अच्छी क्वालिटी वाला वीडियो कॉन्टेंट जनरेट करें.
Live API की मदद से वॉइस एजेंट
Live API की मदद से, रीयल-टाइम में आवाज़ की सुविधा वाले ऐप्लिकेशन और एजेंट बनाएं.
टूल
Gemini को दुनिया से कनेक्ट करें. इसके लिए, Google Search, यूआरएल कॉन्टेक्स्ट, Google Maps, कोड एक्ज़ीक्यूशन, और कंप्यूटर का इस्तेमाल करने की सुविधा जैसे पहले से मौजूद टूल इस्तेमाल करें.
दस्तावेज़ को समझना
टेक्स्ट, इमेज वग़ैरह को प्रोसेस करने वाले मॉडल की मदद से, 1,000 पेजों तक की PDF फ़ाइलों या टेक्स्ट पर आधारित अन्य फ़ाइल टाइप को प्रोसेस करें.
सूझ-बूझ वाला मॉडल
जानें कि सोचने की क्षमता से, मुश्किल टास्क और एजेंट के लिए रीज़निंग की क्षमता कैसे बेहतर होती है.
एजेंट बनाना
मैनेज किए जा रहे एजेंट, Gemini को एक वर्कस्पेस देते हैं, ताकि वह खुद टास्क प्लान कर सके और उन्हें पूरा कर सके. एक ही अनुरोध में, Gemini कोड लिख सकता है और उसे चला सकता है. साथ ही, वेब पर खोज कर सकता है और होस्ट किए गए सैंडबॉक्स एनवायरमेंट में फ़ाइलें बना सकता है. पहले से तैयार Antigravity एजेंट का इस्तेमाल शुरू करें या अपने निर्देशों और टूल के हिसाब से इसे पसंद के मुताबिक बनाएं.
Python
from google import genai
client = genai.Client()
interaction = client.interactions.create(
agent="antigravity-preview-09-2026",
input=(
"Research the top 5 sustainable fashion brands, "
"compare their materials and pricing tiers, and "
"build an interactive dashboard in analysis.html."
),
environment="remote"
)
print(interaction.output_text)
JavaScript
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({});
const interaction = await ai.interactions.create({
agent: "antigravity-preview-09-2026",
input:
"Research the top 5 sustainable fashion brands, " +
"compare their materials and pricing tiers, and " +
"build an interactive dashboard in analysis.html.",
environment: "remote",
});
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(
"Research the top 5 sustainable fashion brands, "
+ "compare their materials and pricing tiers, and "
+ "build an interactive dashboard in analysis.html."))
.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(
"Research the top 5 sustainable fashion brands, " +
"compare their materials and pricing tiers, and " +
"build an interactive dashboard in analysis.html.",
),
Environment: genai.Ptr(interactions.NewCreateAgentInteractionEnvironment("remote")),
}),
})
if err != nil {
log.Fatal(err)
}
if res.Interaction.OutputText != nil {
fmt.Println(*res.Interaction.OutputText)
}
}
आराम का समय
curl -X POST \
"https://generativelanguage.googleapis.com/v1beta/interactions" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"agent": "antigravity-preview-09-2026",
"input": "Research the top 5 sustainable fashion brands, compare their materials and pricing tiers, and build an interactive dashboard in analysis.html.",
"environment": "remote"
}'
Interactions API
Interactions API, जून 2026 से हमारा डिफ़ॉल्ट इंटरफ़ेस बन गया है. आने वाले समय में, Gemini मॉडल और एजेंट की मदद से ऐप्लिकेशन बनाने का यह सबसे अच्छा तरीका है. अगर आपको कोई नया प्रोजेक्ट शुरू करना है, तो आपको Interactions API का इस्तेमाल करना चाहिए. generateContent API अब भी काम करता है, लेकिन इसे अब लेगसी माना जाता है.
इंटरैक्शन की खास जानकारी
जानें कि Interactions API, बातचीत की स्थिति, मैसेज, और आउटपुट फ़ॉर्मैट को कैसे मैनेज करता है.
माइग्रेट करने से जुड़ी गाइड
अपने कोड को generateContent से Interactions API पर माइग्रेट करने के लिए सिलसिलेवार निर्देश.
स्ट्रीमिंग
रीयल-टाइम टोकन, इंक्रीमेंटल थॉट, और टूल कॉल इवेंट स्ट्रीम करें.