Skip to content

Commit 00a0f91

Browse files
committed
Merge API dependency upgrades
2 parents 1d2e506 + 8bbb404 commit 00a0f91

17 files changed

Lines changed: 1563 additions & 2426 deletions

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ RECEIPT_KEEP_FILES=true
8888
8989
AI_PROVIDER=gemini
9090
AI_API_KEY=your_google_ai_key
91+
AI_RECEIPT_API_KEY=your_google_ai_key_for_receipts
92+
AI_TAX_API_KEY=your_google_ai_key_for_tax_sync
9193
AI_MODEL=models/gemma-3-4b-it
9294
AI_CHAT_MODEL=models/gemini-2.5-flash
9395
AI_RECEIPT_MODEL=models/gemini-2.5-flash
@@ -113,6 +115,45 @@ SUPPORT_EMAIL=support@example.com
113115
# BREVO_API_URL=https://api.brevo.com/v3/smtp/email
114116
```
115117

118+
### Gemini API key setup
119+
120+
You can keep one shared Gemini key, but the better setup is separate keys by workload:
121+
122+
- `AI_API_KEY`: WalterLens chat and general AI text features
123+
- `AI_RECEIPT_API_KEY`: receipt OCR parsing and category extraction
124+
- `AI_TAX_API_KEY`: admin tax-rate sync
125+
126+
All dedicated keys are optional. If you leave them unset, the app falls back to `AI_API_KEY`.
127+
128+
Recommended setup:
129+
130+
1. Open Google AI Studio and sign in:
131+
- `https://aistudio.google.com/apikey`
132+
2. Create three API keys:
133+
- one for chat/general AI
134+
- one for receipt parsing
135+
- one for tax sync
136+
3. Name them clearly so usage is easy to track:
137+
- `walletlens-chat`
138+
- `walletlens-receipts`
139+
- `walletlens-tax`
140+
4. Put them in `api/.env`:
141+
142+
```env
143+
AI_API_KEY=your_chat_key
144+
AI_RECEIPT_API_KEY=your_receipt_key
145+
AI_TAX_API_KEY=your_tax_key
146+
```
147+
148+
5. Restart the API after editing env vars.
149+
150+
Notes:
151+
152+
- `AI_RECEIPT_API_KEY` falls back to `AI_API_KEY` if omitted.
153+
- `AI_TAX_API_KEY` falls back to `AI_API_KEY` if omitted.
154+
- You can also use the alternate names `GEMINI_RECEIPT_API_KEY` and `GEMINI_TAX_API_KEY`.
155+
- If you are on Gemini free tier, splitting keys helps isolate features, but quota still depends on the limits of each key/project arrangement in your Google setup.
156+
116157
### Google OAuth checklist
117158

118159
1. In Google Cloud Console, create/select a project.

0 commit comments

Comments
 (0)