Gemini API

Gemini API-এর সাহায্যে দ্রুত প্রম্পট থেকে প্রোডাকশন অ্যাপ ও এজেন্ট তৈরি করুন। Gemini-র মাধ্যমে জটিল কোডিং ও মাল্টিমোডাল রিজনিংয়ের সমাধান করুন অথবা ম্যানেজ করা এজেন্টকে একাধিক ধাপের কাজ দিন। Live API-এর মাধ্যমে ভয়েস ও ভিডিও স্ট্রিম করুন অথবা Nano Banana-র মাধ্যমে ছবি, Gemini Omni-র মাধ্যমে ভিডিও এবং Lyria-র মাধ্যমে মিউজিক তৈরি করুন।

Python

from google import genai

client = genai.Client()

interaction = client.interactions.create(
    model="gemini-4-argon",
    input="Explain how AI works in a few words"
)

print(interaction.output_text)

জাভাস্ক্রিপ্ট

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

const ai = new GoogleGenAI({});

const interaction = await ai.interactions.create({
  model: "gemini-4-argon",
  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-4-argon"))
        .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-4-argon"),
            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-4-argon",
    "input": "Explain how AI works in a few words"
  }'

মডেলের সাথে পরিচিত হন

সবকটি দেখুন

ক্ষমতা এক্সপ্লোর করুন

এজেন্ট তৈরি করুন

ম্যানেজ করা এজেন্ট 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)

জাভাস্ক্রিপ্ট

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 জুন ২০২৬ থেকে আমাদের ডিফল্ট ইন্টারফেস হয়ে গেছে এবং এটি Gemini মডেল ও এজেন্ট ব্যবহার করে অ্যাপ তৈরি করার সেরা উপায়। আপনি নতুন প্রোজেক্ট শুরু করলে, Interactions API ব্যবহার করা উচিত। এটি কাজ করলেও, generateContent API-কে এখন লিগ্যাসি হিসেবে বিবেচনা করা হয়।