How to Get a Google Gemini API Key (and Use It in AI Chat Importer)
Step-by-step guide to creating a Google Gemini API key via Google AI Studio and using it with AI Chat Importer's Auto-Sort feature.
AI Chat Importer's Auto-Sort feature can use Google's Gemini API to automatically categorise and organise your imported conversations into folders. This guide walks through getting a Gemini API key and configuring it in the app.
One thing worth noting upfront: while Gemini's API is available and works well for Auto-Sort, Google does not currently offer a way to export your Gemini conversation history. So you can use Gemini to power Auto-Sort, but you cannot import Gemini conversations into AI Chat Importer. For the full explanation see Why AI Chat Importer Doesn't Support Gemini.
What You'll Need
- A Google account
- Access to Google AI Studio
- AI Chat Importer Desktop — download here
Step 1 — Go to Google AI Studio
Go to aistudio.google.com and sign in with your Google account. Google AI Studio is where you create and manage Gemini API keys.
Step 2 — Create an API Key
- Click Get API Key in the left sidebar
- Click Create API key
- Select an existing Google Cloud project or create a new one when prompted
- Copy the API key that is generated
Unlike OpenAI and Anthropic, Gemini has a generous free tier — you may not need to add a payment method at all for typical Auto-Sort usage.
Step 3 — Enter the Key in AI Chat Importer
- Open the AI Chat Importer desktop app
- Go to Settings → Auto-Sort
- Select Gemini as the provider
- Paste your API key into the API Key field
- Set the model to
gemini-1.5-flash— it is fast, accurate, and covered by the free tier for most usage levels - Click Test Connection — you should see a green confirmation
Step 4 — Run Auto-Sort
With your key configured, go to Settings → Auto-Sort Conversations. AI Chat Importer will scan your imported conversations and suggest a folder structure. Review the suggestions and confirm — your conversations are sorted automatically.
Troubleshooting
"Invalid API key" error Double-check you copied the full key with no spaces. Return to AI Studio and create a new key if needed.
Rate limit errors The Gemini free tier has rate limits. If you are sorting a very large archive and hit rate limits, wait a few minutes and try again, or add a payment method to your Google Cloud project to increase limits.
Test Connection passes but Auto-Sort produces nothing
Make sure you have conversations imported. Check the model name is exactly gemini-1.5-flash — model names are case-sensitive.
For a full guide covering all supported providers including OpenAI, Anthropic, and OpenRouter, see the Cloud AI Auto-Sort setup guide.
Prefer to keep everything local with no API costs? See the Ollama setup guide.