Gemini API

Gemini API, प्रॉम्प्ट से लेकर प्रोडक्शन तक का सबसे तेज़ तरीका है. इसकी मदद से, Gemini, Veo, Nano Banana वगैरह का इस्तेमाल किया जा सकता है. इसकी मदद से, इन जनरेटिव मॉडल को अपने ऐप्लिकेशन में इंटिग्रेट किया जा सकता है. इससे टेक्स्ट और इमेज जनरेट करने, मल्टीमॉडल इनपुट का विश्लेषण करने, और बातचीत करने वाले एजेंट बनाने में मदद मिलती है.

Interactions API, Gemini API और Gemini मॉडल और एजेंट का इस्तेमाल करके ऐप्लिकेशन बनाने का सबसे अच्छा तरीका है. Interactions API की खास जानकारी में इसके बारे में ज़्यादा जानें.

Python

from google import genai

client = genai.Client()

interaction = client.interactions.create(
    model="gemini-3.6-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.6-flash",
  input: "Explain how AI works in a few words",
});

console.log(interaction.output_text);

REST

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.6-flash",
    "input": "Explain how AI works in a few words"
  }'
बनाना शुरू करें

एपीआई पासकोड पाने और कुछ ही मिनटों में पहला एपीआई कॉल करने के लिए, हमारी 'शुरू करें' गाइड देखें.


मॉडल के बारे में जानकारी

सभी देखें

सुविधाओं के बारे में जानें