Google (Gemini)
Access Google’s Gemini models through NotPixel. Gemini models are multimodal and optimized for a variety of tasks.
Setup
1. Get API Key
- Go to Google AI Studio
- Sign in with your Google account
- Create a new API key
Google AI Studio offers a free tier that doesn’t require a credit card, making it a great option for development and testing.
2. Configure Environment
.env
GOOGLE_API_KEY=AI...Usage
import Ads from 'notpixel';
const ads = new Ads({
publisherId: 'pub_xxx',
model: 'google/gemini-3-pro',
input: 'What are the best practices for API design?',
});
const response = await ads.offer();
console.log(response.text);Available Models
| Model | Context | Best For |
|---|---|---|
google/gemini-3-pro | 1M | Complex tasks, long documents |
google/gemini-1.5-flash | 1M | Fast responses, cost-effective |
google/gemini-pro | 32K | General purpose |
Gemini 1.5 Pro has a massive 1 million token context window, making it ideal for processing long documents.
Model Selection
// Best quality, long context
model: 'google/gemini-3-pro'
// Fast and affordable
model: 'google/gemini-1.5-flash'Environment Variable
| Variable | Description |
|---|---|
GOOGLE_API_KEY | Your Google API key |