Overview
Google AI is the public-facing entry point for Gemini models. The Automize Google AI connector covers text generation (chat), embeddings, token counting, and model listing via the Google AI Studio API.
- Regions: Google AI Studio is global. For data-residency / VPC integrations, use Vertex AI on Google Cloud Platform (separate connector, not currently shipped).
- Plans: Free tier with generous quotas (1500 req/day for Gemini Pro). Paid tier via API key with usage-based billing.
Setting up the connection
Auth type: API Key.
- Go to aistudio.google.com/app/apikey → Create API key.
- Choose existing GCP project or create new.
- Copy the key (starts with AIza...).
- In Automize, open Settings → Connectors → Google AI → Add connection. Paste the key.
Find your credentials at https://aistudio.google.com/app/apikey.
Rate limits
Free tier: 15 req/min, 1M tokens/min, 1500 req/day per model. Paid tier: ~1000 req/min. Connector retries 429 with exponential backoff. For high-volume production use Vertex AI with provisioned throughput.
Data model
Two surfaces:
Models – gemini-1.5-pro, gemini-1.5-flash, gemini-2.0-flash, etc.
Generations – request-response or streaming completions
Embeddings – text-embedding-004 vectorsAvailable operations
4 operations available. Click any row to jump to its detail.
| Operation | Category | What it does |
|---|---|---|
| Count Tokens | General | Count tokens in content |
| Create Embedding | General | Generate text embeddings |
| Generate Content | General | Generate text with Gemini |
| List Models | General | List available Gemini models |
Operations
Count Tokens
Count tokens in content
| Parameter | Required | Type | Description |
|---|---|---|---|
Model model | Yes | text | |
Contents contents | Yes | textarea |
Tips
- Returns token count for a prompt – useful for cost estimation before sending.
- Faster than running a real generate.
Create Embedding
Generate text embeddings
| Parameter | Required | Type | Description |
|---|---|---|---|
Model model | Yes | text | |
Content content | Yes | textarea |
Tips
- model: 'text-embedding-004' (768 dimensions) is the standard.
- content: single string or array of strings.
- Vector returned as float array – store in a vector DB for semantic search.
Generate Content
Generate text with Gemini
| Parameter | Required | Type | Description |
|---|---|---|---|
Model model | Yes | text | |
Contents contents | Yes | textarea | |
Generationconfig generationConfig | Yes | text | |
Safetysettings safetySettings | Yes | text |
Tips
- model: e.g. 'gemini-1.5-pro' or 'gemini-1.5-flash' (cheaper/faster).
- contents: array of {role: 'user'|'model', parts: [{text: '...'}]}. Multi-turn conversations build up history.
- generationConfig: temperature (0-2), topP, topK, maxOutputTokens, stopSequences.
- safetySettings: per-category thresholds (HARM_CATEGORY_HARASSMENT, etc.).
Errors
QUOTA_EXCEEDED– Daily quota hit. Free tier is 1500/day per model. Switch to paid or use a cheaper model.INVALID_ARGUMENT– Often contents shape wrong – must be array of {role, parts}.
List Models
List available Gemini models
No input parameters.
Tips
- Returns models available to your API key + their per-model limits + capabilities.
FAQ
- Google AI vs Vertex AI – which?
- Google AI Studio = public consumer/dev API, fastest path to Gemini, API key auth. Vertex AI = GCP enterprise platform, OAuth/service account auth, regional pinning, MLOps. Use this connector for prototyping + small-scale prod; Vertex for enterprise.
- System instruction – how?
- Pass systemInstruction:{parts:[{text:'You are a helpful assistant'}]} alongside contents. Gemini treats this as a persistent role for the conversation.
- Function calling?
- Pass tools:[{functionDeclarations:[...]}] in the request. Gemini returns a functionCall in its response; you execute + return the result in a subsequent generate call.
- Streaming responses?
- Not exposed in this connector – use generate (synchronous) only. For streaming, call the API directly via http connector.