Google AI integration

AI: Gemini – generate content, embeddings, list models

Help CentreConnectors

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.

  1. Go to aistudio.google.com/app/apikey → Create API key.
  2. Choose existing GCP project or create new.
  3. Copy the key (starts with AIza...).
  4. 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 vectors

Available operations

4 operations available. Click any row to jump to its detail.

OperationCategoryWhat it does
Count TokensGeneralCount tokens in content
Create EmbeddingGeneralGenerate text embeddings
Generate ContentGeneralGenerate text with Gemini
List ModelsGeneralList available Gemini models

Operations

Count Tokens

Count tokens in content

ParameterRequiredTypeDescription
Model modelYestext
Contents contentsYestextarea

Tips

  • Returns token count for a prompt – useful for cost estimation before sending.
  • Faster than running a real generate.

Create Embedding

Generate text embeddings

ParameterRequiredTypeDescription
Model modelYestext
Content contentYestextarea

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

ParameterRequiredTypeDescription
Model modelYestext
Contents contentsYestextarea
Generationconfig generationConfigYestext
Safetysettings safetySettingsYestext

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.

Related connectors

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.