98 lines
3.7 KiB
Plaintext
98 lines
3.7 KiB
Plaintext
# Google Gemini API Configuration
|
|
|
|
# ============================================================================
|
|
# OPTION 1: Google AI Studio (Default - Recommended for most users)
|
|
# ============================================================================
|
|
# Get your API key: https://aistudio.google.com/apikey
|
|
GEMINI_API_KEY=your_api_key_here
|
|
|
|
# ============================================================================
|
|
# OPTION 2: Vertex AI (Google Cloud Platform)
|
|
# ============================================================================
|
|
# Uncomment these lines to use Vertex AI instead of Google AI Studio
|
|
# GEMINI_USE_VERTEX=true
|
|
# VERTEX_PROJECT_ID=your-gcp-project-id
|
|
# VERTEX_LOCATION=us-central1
|
|
|
|
# ============================================================================
|
|
# Model Selection (Optional)
|
|
# ============================================================================
|
|
# Override default model for specific tasks
|
|
# Default: gemini-2.5-flash for most tasks
|
|
# GEMINI_MODEL=gemini-2.5-flash
|
|
# GEMINI_IMAGE_GEN_MODEL=gemini-2.5-flash-image
|
|
|
|
# ============================================================================
|
|
# Rate Limiting Configuration (Optional)
|
|
# ============================================================================
|
|
# Requests per minute limit (adjust based on your tier)
|
|
# GEMINI_RPM_LIMIT=15
|
|
|
|
# Tokens per minute limit
|
|
# GEMINI_TPM_LIMIT=4000000
|
|
|
|
# Requests per day limit
|
|
# GEMINI_RPD_LIMIT=1500
|
|
|
|
# ============================================================================
|
|
# Processing Options (Optional)
|
|
# ============================================================================
|
|
# Video resolution mode: default or low-res
|
|
# low-res uses ~100 tokens/second vs ~300 for default
|
|
# GEMINI_VIDEO_RESOLUTION=default
|
|
|
|
# Audio quality: default (16 Kbps mono, auto-downsampled)
|
|
# GEMINI_AUDIO_QUALITY=default
|
|
|
|
# PDF processing mode: inline (<20MB) or file-api (>20MB, automatic)
|
|
# GEMINI_PDF_MODE=auto
|
|
|
|
# ============================================================================
|
|
# Retry Configuration (Optional)
|
|
# ============================================================================
|
|
# Maximum retry attempts for failed requests
|
|
# GEMINI_MAX_RETRIES=3
|
|
|
|
# Initial retry delay in seconds (uses exponential backoff)
|
|
# GEMINI_RETRY_DELAY=1
|
|
|
|
# ============================================================================
|
|
# Output Configuration (Optional)
|
|
# ============================================================================
|
|
# Default output directory for generated images
|
|
# OUTPUT_DIR=./output
|
|
|
|
# Image output format (png or jpeg)
|
|
# IMAGE_FORMAT=png
|
|
|
|
# Image quality for JPEG (1-100)
|
|
# IMAGE_QUALITY=95
|
|
|
|
# ============================================================================
|
|
# Context Caching (Optional)
|
|
# ============================================================================
|
|
# Enable context caching for repeated queries on same file
|
|
# GEMINI_ENABLE_CACHING=true
|
|
|
|
# Cache TTL in seconds (default: 1800 = 30 minutes)
|
|
# GEMINI_CACHE_TTL=1800
|
|
|
|
# ============================================================================
|
|
# Logging (Optional)
|
|
# ============================================================================
|
|
# Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL
|
|
# LOG_LEVEL=INFO
|
|
|
|
# Log file path
|
|
# LOG_FILE=./logs/gemini.log
|
|
|
|
# ============================================================================
|
|
# Notes
|
|
# ============================================================================
|
|
# 1. Never commit API keys to version control
|
|
# 2. Add .env to .gitignore
|
|
# 3. API keys can be restricted in Google Cloud Console
|
|
# 4. Monitor usage at: https://aistudio.google.com/apikey
|
|
# 5. Free tier limits: 15 RPM, 1M-4M TPM, 1,500 RPD
|
|
# 6. Vertex AI requires GCP authentication via gcloud CLI
|