Gemini API Overview#
Skip to main content
/
- English
- Deutsch
- Español – América Latina
- Français
- Indonesia
- Italiano
- Polski
- Português – Brasil
- Shqip
- Tiếng Việt
- Türkçe
- Русский
- עברית
- العربيّة
- فارسی
- हिंदी
- বাংলা
- ภาษาไทย
- 中文 – 简体
- 中文 – 繁體
- 日本語
- 한국어
Get API key Cookbook Community Sign in
- Get API key
- Cookbook
-
Get started
- Get Started
- API keys
- Pricing
- Coding agent setup
-
Models
- Latest Gemini models
- Nano Banana
- Veo
- Gemini Omni Flash
- Lyria 3
- Lyria RealTime
- Imagen
- Text-to-speech
- Live
- Live Translate
- Embeddings
-
Robotics
-
Core capabilities
-
Image
-
Video
-
Speech and audio
-
Thinking
- Function calling
- Long context
-
Agents
- Quickstart
- Antigravity Agent
- Building managed agents
- Environments
- Hooks
- Deep Research Agent
-
Tools
- Google Search
- Google Maps
- Code execution
- URL context
- Computer Use
- File Search
- Combine Tools and Function calling
-
Live API
-
Get started
- Live Translation
- Tool use
- Session management
- Ephemeral tokens
- Best practices
-
Optimization
- Batch API
- Webhooks
- Flex inference
- Priority inference
- Context caching
-
Guides
- Streaming
- Background execution
-
File input
- Media resolution
- Token counting
- Prompt engineering
-
Logs and datasets
-
Safety
-
Frameworks
-
Resources
- Deprecations
- Libraries
-
Migration
- Billing info
- API troubleshooting
- API errors
- Status
- Partner and library integrations
-
Google AI Studio
-
Google Cloud Platform
-
Policies
- Available regions
- Abuse monitoring
- Feedback information
The Interactions API is now generally available. We recommend using this API for access to all the latest features and models.
Gemini API#
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.6-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.6-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.6-flash",
"input": "Explain how AI works in a few words"
}'
Follow our getting started guide to get an API key and make your first API call in minutes.
Meet the models#
auto_awesome 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. spark Gemini 3.6 Flash New Frontier-class performance rivaling larger models at a fraction of the cost. spark Gemini 3.5 Flash-Lite New High-volume, cost-sensitive model optimized for low-latency high throughput subagent tasks. spark 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. video_library Veo 3.1 Our state-of-the-art video generation model, with native audio. spark 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#
imagesmode Native Image Generation (Nano Banana) Generate and edit highly contextual images natively with Gemini 2.5 Flash Image. article Long Context Input millions of tokens to Gemini models and derive understanding from unstructured images, videos, and documents. code Structured Outputs Constrain Gemini to respond with JSON, a structured data format suitable for automated processing. functions Function Calling Build agentic workflows by connecting Gemini to external APIs and tools. videocam Video Generation with Veo 3.1 Create high-quality video content from text or image prompts with our state-of-the-art model. android_recorder Voice Agents with Live API Build real-time voice applications and agents with the Live API. build Tools Connect Gemini to the world through built-in tools like Google Search, URL Context, Google Maps, Code Execution and Computer Use. stacks Document Understanding Process up to 1000 pages of PDF files with full multimodal understanding or other text-based file types. cognition_2 Thinking Explore how thinking capabilities improve reasoning for complex tasks and agents.
Google AI Studio Test prompts, manage your API keys, monitor usage, and build prototypes. group Developer Community Ask questions and find solutions from other developers and Google engineers. menu_book API Reference Find detailed information about the Gemini API in the official reference documentation. sensors Status Check the status of Gemini API, Google AI Studio, and our model services.
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-07-21 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-07-21 UTC."],[],[]]