Google's Gemini API provides access to Gemini 2.5 Pro and Gemini 2.5 Flash — Google's latest multimodal AI models. Supports text, images, audio, video, and code with up to 2M token context windows. Integrated with Google Search grounding for real-time information access. Note: Gemini 2.0 Flash is deprecated and will be shut down June 1, 2026.
https://generativelanguage.googleapis.com/v1beta
Auth type
API Key Header
Auth header
x-goog-api-key: AIzaSy...
Rate limit
15 RPM (free) · 2,000 RPM (paid)
Pricing
Pay per use
Free quota
15 RPM · 1M TPD (Gemini 2.5 Flash-Lite free tier)
Documentation
https://ai.google.dev/gemini-api/docs
Endpoint status
Server online — HTTP 404 — server is online but path returned an error (may require auth)128ms
(checked Mar 29, 2026)
Builder score
B
65%
builder-friendly
Pass your Google API key as a query parameter or in the x-goog-api-key header.
x-goog-api-key: AIzaSy...
Gemini 2.5 Flash: $0.15/M input, $0.60/M output. Gemini 2.5 Flash-Lite: $0.10/M input, $0.40/M output. Gemini 2.5 Pro: $1.25/M input, $5/M output (>200K context). Batch: 50% off. Note: Gemini 2.0 Flash deprecated, ends June 1, 2026.
| Method | Path | Description |
|---|---|---|
| POST | /models/{model}:generateContent |
Generate text, multimodal content |
| POST | /models/{model}:streamGenerateContent |
Stream generated content as SSE |
| POST | /models/{model}:embedContent |
Create text embeddings |
| GET | /models |
List all available models |
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [{
"parts": [{"text": "Explain quantum entanglement simply."}]
}]
}'
{
"candidates": [{
"content": {
"parts": [{"text": "Quantum entanglement is when two particles become linked..."}],
"role": "model"
},
"finishReason": "STOP"
}],
"usageMetadata": {
"promptTokenCount": 9,
"candidatesTokenCount": 120,
"totalTokenCount": 129
}
}
Data sourced from API Map. Always verify pricing and rate limits against the official Google DeepMind documentation.