API Keys (Summaries & Embeddings)
Klip is local-first: you can browse/resume sessions without any API keys. API keys are only needed for optional features like session summaries and semantic search (embeddings).
This page covers provider API keys (Gemini/OpenAI/Anthropic). These are different from Klip daemon API keys (Pro feature) used to access the local daemon HTTP API from scripts/tools.
Key storage and precedence
Klip supports multiple ways to provide API keys:
- VS Code Secret Storage (recommended)
- Use the command palette:
Klip: Configure Gemini API Key - Keys are encrypted by VS Code and are not written into your workspace files.
- Use the command palette:
- VS Code Settings
klip.ai.geminiApiKey(embeddings)klip.ai.openaiApiKey(embeddings)
- Environment variables (useful for CI / managed environments)
When multiple sources are present, Klip prefers Secret Storage, then settings, then environment variables.
Summaries (default: Gemini)
Default model
Klip's default summary model is gemini-2.5-flash, which can run using a Gemini API key (no CLI login required).
Gemini offers a free tier, but quotas and availability can change. Refer to Google's official docs for current limits.
Set up a Gemini key (recommended)
- Create an API key in Google AI Studio: https://aistudio.google.com/app/apikey
- In VS Code, run:
Klip: Configure Gemini API Key - Choose Summaries (or Both) and pick a scope (This workspace or All workspaces)
- Restart the Klip daemon when prompted
Environment variables for summaries
KLIP_GEMINI_API_KEY_SUMMARIES(use a dedicated key just for summaries)KLIP_GEMINI_API_KEY(single key for Gemini features)GEMINI_API_KEY/GOOGLE_API_KEY(fallbacks)
If you do not set a dedicated summaries key, Klip will fall back to the Gemini key used for embeddings (if present).
Using Claude/Codex for summaries
If you switch the summary model to Claude or Codex, summaries are generated via the corresponding CLI and will require you to sign in there (claude login / codex login).
Embeddings (semantic search)
Embeddings power features like semantic search and similarity. Klip can use either OpenAI or Gemini embeddings.
Choose provider
The daemon auto-selects an embeddings provider based on which keys are present, but you can force it in settings:
klip.ai.embeddingProvider:auto(default),openai, orgemini
Gemini embeddings
- VS Code setting:
klip.ai.geminiApiKey - Environment variables:
KLIP_GEMINI_API_KEY->GEMINI_API_KEY->GOOGLE_API_KEY
OpenAI embeddings
- VS Code setting:
klip.ai.openaiApiKey - Environment variables:
KLIP_CODEX_API_KEY->KLIP_OPENAI_API_KEY->OPENAI_API_KEY
Optional: Claude API key (advanced)
You do not need an Anthropic API key for normal Klip usage. Claude-based summaries run via the Claude Code CLI (claude login).
If you enable provider model fetching (klip.models.enableAPIFetch=true) and want Claude model lists via the Anthropic API, provide:
KLIP_CLAUDE_API_KEY(recommended) orANTHROPIC_API_KEY
Reference links
- Google AI Studio (API keys): https://aistudio.google.com/app/apikey
- Gemini API docs: https://ai.google.dev/
- OpenAI API keys: https://platform.openai.com/api-keys