Google Gemini
Kenaz supports Google's Gemini model family through two endpoints:
- AI Studio (
generativelanguage.googleapis.com) — public API, authenticates with a Google AI Studio API key. Easiest path for personal use and experimentation. - Vertex AI (
aiplatform.googleapis.com) — enterprise path, runs inside your Google Cloud project, authenticates with a service account or Application Default Credentials (ADC).
Pick the endpoint that matches how your Google Cloud access is set up.
AI Studio (recommended starter)
What you need
- A Google account
- A Google AI Studio API key — free tier available, paid tier unlocks higher rate limits
Steps
- Get an API key. Open aistudio.google.com/app/apikey → Create API key. The key starts with
AIza. - Add to Kenaz. Open Providers → Add provider → Google Gemini.
- Endpoint: select AI Studio (default).
- API Key: paste the key (
AIza…). - Click Connect. Kenaz calls the AI Studio
/v1beta/modelsendpoint and returns the list of models your key can access that supportgenerateContentorstreamGenerateContent.
- Pick one or more models from the list, then click Add provider.
Model discovery is live — the list reflects what your key has access to at the moment you click Connect.
Vertex AI
What you need
- A Google Cloud project with the Vertex AI API enabled (
aiplatform.googleapis.com) - A region where Vertex AI supports Gemini (e.g.
us-central1,europe-west4) - One of three auth options (see below)
Steps
-
Add to Kenaz. Open Providers → Add provider → Google Gemini.
-
Endpoint: select Vertex AI.
-
GCP Project ID: enter your Google Cloud project ID (e.g.
my-gcp-project). -
Region: enter the Vertex AI region (e.g.
us-central1). Default isus-central1. -
Auth method: pick one of:
- ADC (Application Default Credentials) — Kenaz uses whatever credentials
gcloudhas configured. Rungcloud auth application-default loginin a terminal before starting Kenaz. This is the right pick for developer machines already logged intogcloud. - Service account (paste) — paste the full contents of a service-account JSON key file directly into the API Key field. The JSON starts with
{ "type": "service_account", … }. Kenaz stores the JSON in your OS keychain. - Service account (path) — enter the filesystem path to a service-account JSON key file (e.g.
/path/to/service-account.json). Kenaz reads the file at call time; it is not copied into the keychain.
- ADC (Application Default Credentials) — Kenaz uses whatever credentials
-
Model IDs: Vertex AI does not expose a simple
/modelslist endpoint that Kenaz can poll, so enter the Gemini model IDs you want to use, one per line (e.g.gemini-2.5-pro,gemini-2.0-flash). Use the canonical model IDs from the Vertex AI model garden. -
Click Add provider.
Models and what they're for
Google publishes the canonical model list at ai.google.dev/gemini-api/docs/models (AI Studio) and cloud.google.com/vertex-ai/generative-ai/docs/learn/models (Vertex AI).
Notable picks:
- gemini-2.5-pro — flagship. Long context, vision, strong reasoning.
- gemini-2.5-flash — faster and cheaper than Pro; good daily-driver.
- gemini-2.0-flash — previous generation Flash, still capable at lower cost.
Kenaz supports vision (image inputs) on all Gemini models that declare vision capability. Note the following limitations in the adapter:
- PDF inputs are not supported inline — Gemini requires the File API for PDFs, which is out of scope. Attach PDFs via the harness's text-extraction path instead.
- GIF images are rejected by the Gemini API; the harness will surface this as an error.
- Tool call IDs are synthesised positionally (
call_0,call_1, …) because Gemini does not assign stable IDs.
Pricing
- AI Studio: free tier with rate limits; paid tier via aistudio.google.com or the Google AI Studio API pricing page.
- Vertex AI: billed to your Google Cloud project. Pricing at cloud.google.com/vertex-ai/generative-ai/pricing.
Privacy posture
- AI Studio: by default, Google may use prompts to improve its products. You can opt out in aistudio.google.com/app/settings. See Google's API Additional Terms of Service.
- Vertex AI: data stays within your Google Cloud project. Google does not use Vertex AI inputs to train models. Covered by the Google Cloud DPA and relevant compliance certifications (SOC 2, ISO 27001, HIPAA with BAA). See cloud.google.com/terms/data-processing-addendum.
Troubleshooting
401 Unauthorized/403 Forbidden(AI Studio) — the API key is invalid or expired. Regenerate at aistudio.google.com/app/apikey.401 Unauthorized(Vertex AI / ADC) — ADC token is expired or not configured. Rungcloud auth application-default loginagain.403 Permission denied(Vertex AI) — the service account or ADC identity doesn't have theroles/aiplatform.userrole on the project, or the Vertex AI API is not enabled. Enable it atconsole.cloud.google.com/apis/library/aiplatform.googleapis.comand check IAM.gemini: AI Studio requires an API key— you selected AI Studio but left the API key blank. Paste theAIza…key.- No models listed after Connect (AI Studio). The key is valid but the account hasn't been provisioned for any
generateContent-capable models yet. Try a different key or check the API key's associated project. - Vertex model not found. Confirm the model ID is spelled correctly and is available in the region you specified. Not all Gemini models are available in all regions.