Gemini Developer API बनाम Gemini Enterprise Agent Platform

Gemini की मदद से जनरेटिव एआई के समाधान तैयार करते समय, Google दो एपीआई प्रॉडक्ट उपलब्ध कराता है: Gemini Developer API और Gemini Enterprise Agent Platform API.

Gemini Developer API की मदद से, Gemini की सुविधाओं वाले ऐप्लिकेशन को तेज़ी से बनाया, प्रोडक्शन में लाया, और स्केल किया जा सकता है. ज़्यादातर डेवलपर को Gemini Developer API का इस्तेमाल करना चाहिए. हालांकि, अगर एंटरप्राइज़ के लिए खास कंट्रोल की ज़रूरत हो, तो वे Gemini Enterprise API का इस्तेमाल कर सकते हैं.

Gemini Enterprise Agent Platform, एंटरप्राइज़ के लिए तैयार सुविधाओं और सेवाओं का एक पूरा इकोसिस्टम उपलब्ध कराता है. इसकी मदद से, Google Cloud Platform पर जनरेटिव एआई ऐप्लिकेशन बनाए और डिप्लॉय किए जा सकते हैं.

हमने हाल ही में, इन सेवाओं के बीच माइग्रेट करने की प्रोसेस को आसान बनाया है. Gemini Developer API और Gemini Enterprise Agent Platform API, दोनों को अब Google Gen AI SDK के ज़रिए ऐक्सेस किया जा सकता है.

कोड की तुलना करना

इस पेज पर, टेक्स्ट जनरेट करने के लिए Gemini Developer API और Gemini Enterprise Agent Platform की क्विकस्टार्ट गाइड के कोड की तुलना की गई है.

Python

Gemini Developer API और Gemini Enterprise Agent Platform, दोनों की सेवाओं को google-genai लाइब्रेरी के ज़रिए ऐक्सेस किया जा सकता है. google-genai को इंस्टॉल करने का तरीका जानने के लिए, लाइब्रेरी पेज पर जाएं.

Gemini Developer API

from google import genai

client = genai.Client()

response = client.models.generate_content(
    model="gemini-3-flash-preview", contents="Explain how AI works in a few words"
)
print(response.text)

Gemini Enterprise Agent Platform API

from google import genai

client = genai.Client(
    vertexai=True, project='your-project-id', location='us-central1'
)

response = client.models.generate_content(
    model="gemini-3-flash-preview", contents="Explain how AI works in a few words"
)
print(response.text)

JavaScript और TypeScript

Gemini Developer API और Gemini Enterprise Agent Platform, दोनों की सेवाओं को @google/genai लाइब्रेरी के ज़रिए ऐक्सेस किया जा सकता है. @google/genai को इंस्टॉल करने का तरीका जानने के लिए, लाइब्रेरी पेज देखें.

Gemini Developer API

import { GoogleGenAI } from "@google/genai";

const ai = new GoogleGenAI({});

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

main();

Gemini Enterprise Agent Platform API

import { GoogleGenAI } from '@google/genai';
const ai = new GoogleGenAI({
  vertexai: true,
  project: 'your_project',
  location: 'your_location',
});

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

main();

ऐप पर जाएं

Gemini Developer API और Gemini Enterprise Agent Platform, दोनों की सेवाओं को google.golang.org/genai लाइब्रेरी के ज़रिए ऐक्सेस किया जा सकता है. google.golang.org/genai को इंस्टॉल करने का तरीका जानने के लिए, लाइब्रेरी पेज देखें.

Gemini Developer API

import (
  "context"
  "encoding/json"
  "fmt"
  "log"
  "google.golang.org/genai"
)

// Your Google API key
const apiKey = "your-api-key"

func main() {
  ctx := context.Background()
  client, err := genai.NewClient(ctx, nil)
  if err != nil {
      log.Fatal(err)
  }

  // Call the GenerateContent method.
  result, err := client.Models.GenerateContent(ctx, "gemini-3-flash-preview", genai.Text("Tell me about New York?"), nil)

}

Gemini Enterprise Agent Platform API

import (
  "context"
  "encoding/json"
  "fmt"
  "log"
  "google.golang.org/genai"
)

// Your GCP project
const project = "your-project"

// A GCP location like "us-central1"
const location = "some-gcp-location"

func main() {
  ctx := context.Background()
  client, err := genai.NewClient(ctx, &genai.ClientConfig
  {
        Project:  project,
      Location: location,
      Backend:  genai.BackendVertexAI,
  })

  // Call the GenerateContent method.
  result, err := client.Models.GenerateContent(ctx, "gemini-3-flash-preview", genai.Text("Tell me about New York?"), nil)

}

इस्तेमाल के अन्य उदाहरण और प्लैटफ़ॉर्म

अन्य प्लैटफ़ॉर्म और इस्तेमाल के उदाहरणों के लिए, Gemini Developer API के दस्तावेज़ और Gemini Enterprise एजेंट प्लैटफ़ॉर्म के दस्तावेज़ में, इस्तेमाल के उदाहरणों से जुड़ी गाइड देखें.

माइग्रेशन से जुड़ी ज़रूरी बातें

माइग्रेट करने पर:

अगर आपको Gemini Developer API के लिए, Gemini API पासकोड का इस्तेमाल नहीं करना है, तो सुरक्षा के सबसे सही तरीके अपनाएं और इसे मिटाएं.

किसी एपीआई पासकोड को मिटाने के लिए:

  1. Google Cloud API के क्रेडेंशियल पेज खोलें.

  2. वह एपीआई पासकोड ढूंढें जिसे आपको मिटाना है. इसके बाद, कार्रवाइयां आइकॉन पर क्लिक करें.

  3. एपीआई पासकोड मिटाएं को चुनें.

  4. क्रेडेंशियल मिटाएं मोडल में जाकर, मिटाएं को चुनें.

    एपीआई पासकोड को हटाने में कुछ मिनट लगते हैं. प्रॉपगेशन पूरा होने के बाद, मिटाई गई एपीआई कुंजी का इस्तेमाल करने वाले किसी भी ट्रैफ़िक को अस्वीकार कर दिया जाता है.

अगले चरण