Gemini Developer API vs. Gemini Enterprise Agent Platform

When developing generative AI solutions with Gemini, Google offers two API products: the Gemini Developer API and the Gemini Enterprise Agent Platform API.

The Gemini Developer API provides the fastest path to build, productionize, and scale Gemini powered applications. Most developers should use the Gemini Developer API unless there is a need for specific enterprise controls.

Gemini Enterprise Agent Platform offers a comprehensive ecosystem of enterprise ready features and services for building and deploying generative AI applications backed by the Google Cloud Platform.

We've recently simplified migrating between these services. Both the Gemini Developer API and the Gemini Enterprise Agent Platform API are now accessible through the unified Google Gen AI SDK.

Code comparison

This page has side-by-side code comparisons between Gemini Developer API and Gemini Enterprise Agent Platform quickstarts for text generation.

Python

You can access both the Gemini Developer API and Gemini Enterprise Agent Platform services through the google-genai library. See the libraries page for instructions on how to install google-genai.

Gemini Developer API

from google import genai

client = genai.Client()

response = client.models.generate_content(
    model="gemini-3.7-flash", contents="Explain how AI works in a few words"
)
print(response.text)

Gemini Enterprise Agent Platform API

from google import genai

client = genai.Client(
    vertexai=True, project='your-project-id', location='us-central1'
)

response = client.models.generate_content(
    model="gemini-3.7-flash", contents="Explain how AI works in a few words"
)
print(response.text)

JavaScript and TypeScript

You can access both Gemini Developer API and Gemini Enterprise Agent Platform services through @google/genai library. See libraries page for instructions on how to install @google/genai.

Gemini Developer API

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

const ai = new GoogleGenAI({});

async function main() {
  const response = await ai.models.generateContent({
    model