Using the API
Use Chat completion API to call Gemini models. See the pricing page for pricing details.Gemini models comparison
| Feature | Gemini 2.5 Pro Preview | Gemini 2.5 Flash | Gemini 2.5 Flash-Lite | Gemini 2.0 Flash | Gemini 1.5 Pro |
|---|---|---|---|---|---|
| Description | Most advanced Gemini model | Versatile and fast | Lightweight and efficient | Cost-effective for simple tasks | Previous generation advanced model |
| Best for | Complex tasks requiring deep understanding | High-throughput applications | Quick responses and efficient processing | Budget-friendly tasks | Complex reasoning and analysis |
| Vision capability | Yes | No | No | No | Yes |
| Context window | 1M tokens | 1M tokens | 1M tokens | 1M tokens | 1M tokens |
| API model key | gemini-2.5-pro | gemini-2.5-flash | gemini-2.5-flash-lite | gemini-2.0-flash-001gemini-2.0-flash-thinking-exp-01-21gemini-2.0-flash-exp | gemini-1.5-pro-preview-0409gemini-1.5-pro |
Important notes
Long context handling
- All models support up to 1M tokens context window
- Different pricing tiers apply based on input length:
- Standard rate for inputs less than 128k tokens
- Higher rate for inputs more than 128k tokens
- Please check the pricing page for detailed pricing information
Vision capabilities
- Gemini 2.5 Pro Preview and Gemini 1.5 Pro support multimodal inputs including images
- Can analyze complex visual information and provide detailed descriptions
- Vision support is not available in Flash or Flash-Lite models
Model strengths
-
Gemini 2.5 Pro Preview:
- Advanced reasoning and analysis
- Multimodal understanding
- Complex task handling
- Code generation and analysis
-
Gemini 2.5 Flash:
- Fast response times
- Cost-effective for simple tasks
- Efficient token usage
- Good for high-throughput applications
-
Gemini 2.5 Flash-Lite:
- Lightweight and efficient
- Ideal for quick responses
- Budget-friendly for simple tasks
-
Gemini 2.0 Flash:
- Cost-effective for basic tasks
- Reliable for lightweight applications
- Efficient token usage
-
Gemini 1.5 Pro:
- Previous generation advanced model
- Multimodal capabilities
- Complex reasoning and analysis