Appearance
Setting Up API Keys
To use AI translation, you need API keys from one or more LLM providers.
Supported Providers
| Provider | Models | Best For |
|---|---|---|
| OpenAI | GPT-4o, GPT-4-turbo, GPT-3.5 | General translation, fast responses |
| Anthropic | Claude 3.5 Sonnet, Claude 3 Opus | Complex texts, nuanced writing |
| Gemini Pro, Gemini Ultra | Multilingual content | |
| Ollama | Llama, Mistral, etc. | Free, offline, privacy |
Getting API Keys
OpenAI
- Go to platform.openai.com
- Sign up or log in
- Navigate to API Keys in the sidebar
- Click Create new secret key
- Copy the key (it won't be shown again!)
WARNING
OpenAI requires a paid account with credits. New accounts may get free trial credits.
Anthropic
- Go to console.anthropic.com
- Sign up or log in
- Navigate to API Keys
- Click Create Key
- Copy the key
Google (Gemini)
- Go to makersuite.google.com
- Sign in with your Google account
- Click Get API key
- Create a key for a new or existing project
- Copy the key
Ollama (Free, Local)
Ollama runs models locally - no API key needed!
- Download from ollama.ai
- Install and run Ollama
- Download a model:
ollama pull llama2 - Supervertaler will detect it automatically
Adding Keys to Supervertaler
Method 1: Settings Dialog (Recommended)
- Go to Settings tab
- Find the LLM Settings section
- Enter your API keys in the appropriate fields
- Click Save
Method 2: api_keys.txt File
Create or edit api_keys.txt in the Supervertaler folder:
openai_api_key=sk-your-key-here
anthropic_api_key=sk-ant-your-key-here
google_api_key=AIza-your-key-hereINFO
Security: The api_keys.txt file is gitignored and never uploaded to GitHub.
Testing Your Setup
- Import a document or create a new project
- Select a segment
- Press
Ctrl+Tto translate - If successful, you'll see the translation appear
Troubleshooting
| Problem | Solution |
|---|---|
| "Invalid API key" | Double-check the key, ensure no extra spaces |
| "Rate limit exceeded" | Wait a minute, or upgrade your API plan |
| "Model not found" | Check if the model name is correct in settings |
| No response | Check your internet connection |
Choosing a Provider
For beginners: Start with OpenAI GPT-4o - it's fast, reliable, and has good translation quality.
For cost-conscious users: Use Ollama with a local model like Llama 3 - completely free!
For sensitive content: Use Ollama (data stays on your machine) or Anthropic Claude.