Gemini 2.5 Pro

Google GeminiGoogle Gen AI SDK (Developer API or Vertex AI)

gemini-2.5-proModel ID
2025-06-01Release Date
google_gemini

Gemini 2.5 Pro

Last checked: 2025-08-11

Model ID
gemini-2.5-pro
Release2025-06-01
APIGoogle Gen AI SDK (Developer API or Vertex AI)

Endpoints

docs_home
https://ai.google.dev/gemini-api/docs

Install

Node
npm i @google/genai
Python
pip install google-genai

Environment

api_key
GEMINI_API_KEY

Code examples

JavaScript
import { GoogleGenerativeAI } from "@google/genai";\nconst client = new GoogleGenerativeAI({ apiKey: process.env.GEMINI_API_KEY });\nconst model = client.getGenerativeModel({ model: "gemini-2.5-pro" });\nconst result = await model.generateContent("Write a 3-line haiku about sunrise over London.");\nconsole.log(result.response.text());
Python
import os\nfrom google import genai\nclient = genai.Client(api_key=os.environ["GEMINI_API_KEY"])\nresp = client.models.generate_content(\n    model="gemini-2.5-pro",\n    contents="Write a 3-line haiku about sunrise over London."\n)\nprint(resp.text)

Notes

Use the new Google Gen AI SDKs (python: google-genai; JS: @google/genai). Model id is exactly "gemini-2.5-pro". Thinking is supported on Pro; older @google/generative-ai and google-generativeai are deprecated.