Gemini API

Interactions API, Gemini मॉडल और एजेंटों के साथ काम करने का सबसे आसान और बेहतरीन तरीका है. Interactions API की खास जानकारी में इसके बारे में ज़्यादा जानें.

Gemini, Veo, Nano Banana वगैरह की मदद से, प्रॉम्प्ट से लेकर प्रोडक्शन तक का सबसे तेज़ तरीका.

Python

from google import genai

client = genai.Client()

interaction = client.interactions.create(
    model="gemini-3.5-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.5-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.5-flash",
    "input": "Explain how AI works in a few words"
  }'
बनाना शुरू करें

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


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

सभी देखें

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