Get a Google Gemini API key & install it in LottoLens
Part 1 — Get the key (on Mac or iPhone, ~60 seconds)
-
Open a browser and go to: https://aistudio.google.com/app/apikey
-
Sign in with any Google account (Gmail works).
-
If prompted, accept the Google AI Studio terms of service.
-
Click the blue "Create API key" button (top right).
-
If asked, choose "Create API key in new project". (If you already have a Google Cloud project and prefer that, pick it from the list — either is fine.)
-
A pop-up shows your new key — it starts with AIza... and is about 39 characters long.
-
Click the copy icon next to the key to copy it to your clipboard.
-
(Optional) You can return to this page any time to view, rename, or delete the key.
That's it — no credit card, no billing setup. The free tier gives you 250 requests/day, more than enough for daily picks.
Part 2 — Paste it into LottoLens (on the iPhone)
-
Open LottoLens on your iPhone.
-
Tap the Settings tab (gear icon, bottom right).
-
Tap inside the "Google Gemini API key" field — the keyboard appears.
-
Long-press the field and tap Paste (or paste from your keyboard).
-
Tap Done (top-right of the keyboard) — or just tap anywhere outside the field — to close the keyboard.
-
Tap the white Save button.
-
The button label switches to Update — that confirms the key is stored securely in your iPhone's Keychain.
Part 3 — Test it
-
Tap the Picks tab (sparkles icon).
-
Pick a strategy (e.g. 🔥 Hot Numbers) and leave the slider at 3 tickets.
-
Tap the big ✨ Generate My Picks button.
-
After a couple of seconds you'll see 3 ticket cards with numbers and a one-line reason from Gemini for each pick.
If something goes wrong:
-
"Add your Google Gemini API key" — the key didn't save. Go back to Settings and re-paste.
-
"Gemini API error 400/403" — the key is invalid or hasn't been activated yet. Wait 30 seconds and try again, or generate a fresh key at aistudio.google.com.
-
No internet warning — connect to Wi-Fi or mobile data and retry.
Keeping the key safe
-
The key lives only on your iPhone, in iOS Keychain (encrypted, sandboxed to LottoLens).
-
It's never logged, synced, or sent anywhere except directly to generativelanguage.googleapis.com.
-
If you ever want to remove it: Settings tab → tap Remove next to the key field.
-
If you think it's been leaked: revoke it at https://aistudio.google.com/app/apikey and generate a new one.