Skip to Content
Nexalexica Beta 1.0.0 is released 🎉 Try it now
DocumentationAPIGoogle Gemini API Setup Guide

Google Gemini API Setup Guide

Getting Your Google Gemini API Key

Step 1: Access Google AI Studio

  1. Visit ai.google.dev 
  2. Click “Google AI Studio” or “Get API key”
  3. Sign in with your Google account

Step 2: Create New Project (if needed)

  1. Select an existing Google Cloud project or create a new one
  2. Enable the Generative AI API for your project
  3. Accept terms of service

Step 3: Generate API Key

  1. In Google AI Studio, click “Get API key”
  2. Choose “Create API key in new project” or use existing project
  3. Copy and securely store your API key

Available Gemini Models

Gemini 2.0 Family (Latest)

  • gemini-2.0-flash-exp - Latest experimental model
  • gemini-2.0-flash-thinking-exp - Advanced reasoning capabilities

Gemini 1.5 Family

  • gemini-1.5-pro - Most capable production model
  • gemini-1.5-flash - Faster, efficient model
  • gemini-1.5-flash-8b - Lightweight version

Gemini 1.0 Family

  • gemini-1.0-pro - Original production model
  • gemini-1.0-pro-vision - Multimodal with vision capabilities

Specialized Models

  • gemini-pro-vision - Image and text understanding
  • text-embedding-004 - Text embeddings model

Key Features

  • Multimodal capabilities (text, images, video, audio)
  • Large context windows (up to 2M tokens for some models)
  • Function calling and tool use
  • Code execution capabilities
  • Strong multilingual support

Context Windows

  • Gemini 1.5 Pro: Up to 2 million tokens
  • Gemini 1.5 Flash: 1 million tokens
  • Gemini 1.0 Pro: 32K tokens

Pricing

  • Generous free tier for development
  • Pay-as-you-go pricing for production
  • Different rates for input/output tokens
  • Free quota resets monthly

Rate Limits

  • Free tier: Limited requests per minute
  • Paid tier: Higher rate limits available
  • Usage tracked in Google Cloud Console

Security Tips

  • Restrict API key usage by IP or referrer
  • Use Google Cloud IAM for advanced access control
  • Monitor usage in Google Cloud Console
  • Never expose keys in client-side code
Last updated on