Gemini API पासकोड पाएं और कुछ ही मिनटों में अपना पहला एपीआई अनुरोध करें.

PythonNode.jsREST
from google import genai

client = genai.Client(api_key="YOUR_API_KEY")

response = client.models.generate_content(
    model="gemini-2.0-flash",
    contents="Explain how AI works",
)

print(response.text)
import { GoogleGenAI } from "@google/genai";

const ai = new GoogleGenAI({ apiKey: "YOUR_API_KEY" });

async function main() {
  const response = await ai.models.generateContent({
    model: "gemini-2.0-flash",
    contents: "Explain how AI works",
  });
  console.log(response.text);
}

await main();
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=YOUR_API_KEY" \
  -H 'Content-Type: application/json' \
  -X POST \
  -d '{
    "contents": [
      {
        "parts": [
          {
            "text": "Explain how AI works in a few words"
          }
        ]
      }
    ]
  }'

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

Google AI Studio में Gemini का इस्तेमाल करना

एपीआई के बारे में जानकारी

नेटिव इमेज जनरेशन

Gemini 2.0 Flash की मदद से, कॉन्टेक्स्ट के हिसाब से इमेज जनरेट करें और उनमें बदलाव करें.

लंबे कॉन्टेक्स्ट को एक्सप्लोर करना

Gemini मॉडल में लाखों टोकन डालें और बिना स्ट्रक्चर वाली इमेज, वीडियो, और दस्तावेज़ों से जानकारी पाएं.

स्ट्रक्चर्ड आउटपुट जनरेट करना

Gemini को JSON फ़ॉर्मैट में जवाब देने के लिए कहें. यह स्ट्रक्चर्ड डेटा का एक ऐसा फ़ॉर्मैट है जो अपने-आप प्रोसेस होने के लिए सही है.

Gemini API का इस्तेमाल करके ऐप्लिकेशन बनाना

शुरू करें