OpenAI Integration
Connect CommandLane to OpenAI for AI-powered classification, planning, and chat features.
Why OpenAI?
- High accuracy: GPT models provide excellent classification and planning
- Fast responses: Cloud-based processing for quick results
- Latest models: Access to GPT-4o and other cutting-edge models
Setup Guide
Step 1: Get an API Key
- Go to OpenAI Platform
- Sign in or create an account
- Click Create new secret key
- Copy the key (starts with
sk-)
Keep Your Key Safe
Your API key is like a password. Never share it or commit it to version control.
Step 2: Add Your Key to CommandLane
- Open Dashboard (Ctrl + Shift + D)
- Go to Integrations
- Find the OpenAI card
- Click Configure
- Paste your API key
- Click Test Connection to verify
- Click Save
Step 3: Configure AI Features
In Dashboard > Settings > AI Settings:
| Feature | Recommended Model | Purpose |
|---|---|---|
| Classification | gpt-4o-mini | Categorize entries as tasks/notes |
| Planning | gpt-4o | Generate daily plans |
| Chat | gpt-4o-mini | Answer questions about your entries |
Step 4: Test the Integration
- Open Capture Window (Ctrl + Space)
- Type a test entry like "Remember to call mom"
- If classification works, OpenAI is configured correctly
Recommended Models
| Model | Best For | Cost |
|---|---|---|
| gpt-4o-mini | Classification, Chat | $0.15/1M input tokens |
| gpt-4o | Planning, Complex tasks | $2.50/1M input tokens |
Pricing
OpenAI charges per token (roughly 4 characters = 1 token). Typical CommandLane usage:
- Light use: ~$1/month
- Moderate use: ~$3-5/month
- Heavy use: ~$10-15/month
Monitor your usage at OpenAI Usage Dashboard.
Troubleshooting
"Invalid API key"
- Verify your key starts with
sk- - Check for extra spaces when copying
- Generate a new key if issues persist
"Rate limit exceeded"
- OpenAI has usage limits on new accounts
- Wait a few minutes and try again
- Consider upgrading your OpenAI plan
Classification not working
- Ensure OpenAI is selected as the Classification provider in Settings
- Test the connection on the Integrations page
- Check that your API key has available credits
Slow responses
- OpenAI response times vary by model and load
- gpt-4o-mini is faster than gpt-4o
- Consider using local AI (Ollama) for faster classification
Privacy
When using OpenAI:
- Entry text is sent for AI processing
- Data is subject to OpenAI's Privacy Policy
- OpenAI may use data to improve their models (opt-out available)
- For fully local processing, consider Ollama instead
Stay Private
If privacy is a concern, use local AI classification in Settings > AI Settings and only enable OpenAI for specific features like planning.