Google AI for Developers

Skip to main content

The Gemini API is the fastest path from prompt to production with Gemini, Veo, Nano Banana, and more. It lets you integrate these generative models into your applications to generate text and images, analyze multimodal inputs, and build conversational agents.

The Interactions API is the best way to build with Gemini API and Gemini models and agents. Learn more in the Interactions API Overview.

Python

from google import genai
client = genai.Client()
interaction = client.interactions.create(
    model="gemini-3.7-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.7-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.7-flash",
    "input": "Explain how AI works in a few words"
  }'

Start building

Follow our getting started guide to get an API key and make your first API call in minutes.


Gemini 3.1 Pro New

Our most intelligent model, the best in the world for multimodal understanding, all built on state-of-the-art reasoning.

Gemini 3.7 Flash New

Our latest and most capable Flash model, built for complex coding, agentic workflows, and reliable multi-step execution.

Gemini 3.6 Flash

Our previous-generation Flash model, balancing speed and multimodal capabilities across general agentic and everyday tasks.

Gemini 3.5 Flash

Our legacy Flash model, providing baseline speed and foundational performance for routine, high-throughput workloads.

Gemini 3.5 Flash-Lite New

High-volume, cost-sensitive model optimized for low-latency high throughput subagent tasks.

Gemini 3.1 Flash-Lite

High-volume, cost-sensitive model with the performance and quality of the Gemini 3 series.

Gemini 3 Flash

Frontier-class performance rivaling larger models at a fraction of the cost.

Nano Banana 2 and Nano Banana Pro

State-of-the-art image generation and editing models.

Veo 3.1

Our state-of-the-art video generation model, with native audio.

Gemini Robotics

A vision-language model (VLM) that brings Gemini's agentic capabilities to robotics and enables advanced reasoning in the physical world.

Explore Capabilities

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-08-17 UTC.

Read the original on ai.google.dev ↗