Gemini Api Setup
How to Get Your Google Gemini API Key for PintarRPH Web
This guide will help you obtain a Google Gemini API key for PintarRPH Web. Setting up a personal key is optional — PintarRPH uses a built-in AI system so you can generate RPH and RPT immediately without any API key. Add your own key here if you prefer to use your personal Google AI quota.
Platform: https://pintarrph.com
What You'll Need
- A Google account (Gmail)
- A web browser (Chrome, Firefox, Edge, Safari, etc.)
Note: The Gemini API has a generous free tier that is suitable for most teachers. You will not need to provide payment information for the free tier.
Video Tutorial
A video tutorial is available on the Gemini API key setup page within PintarRPH. Go to "Tetapan" (Settings) → "Kunci API Gemini" to watch the embedded YouTube guide.
Step-by-Step Guide
Step 1: Go to Google AI Studio
- Open your web browser
- Go to: https://aistudio.google.com/app/apikey
- Sign in with your Google account (Gmail)
Step 2: Create API Key
- Click the "Get API key" or "Create API key" button
- You will see a dialog with options:
- "Create API key in new project" (recommended for first-time users)
- "Create API key in existing project" (if you already have a Google Cloud project) - Choose "Create API key in new project"
- Wait a few seconds while Google creates your project
Step 3: Copy Your API Key
- Your new API key will be displayed in a dialog box
- It looks something like this:
AIzaSyBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - Click "Copy" to copy the API key to your clipboard
- IMPORTANT: Save this key somewhere safe! (See security tips below)
Step 4: Configure API Key in PintarRPH Web
-
Log in to PintarRPH Web:
- Open your browser and go to https://pintarrph.com
- Log in with your PintarRPH account -
Go to Settings:
- Click on "Tetapan Sistem" (Settings) in the navigation menu -
Find the API key section:
- Look for the section "Kunci API Gemini"
- You will see 5 numbered key fields:
| Key | Feature Group | Behaviour |
|---|---|---|
| Key 1 | Jana RPH | Primary key; other empty fields fall back to this |
| Key 2 | Jana RPH Custom | Separate quota for custom topic generation |
| Key 3 | Jana RPT | Dedicated key for annual plan generation |
| Key 4 | Ekstrak Buku Teks & SK/SP | Dedicated key for textbook/DSKP extraction |
| Key 5 | Muat Naik Kalendar | Dedicated key for calendar upload |
-
Paste your API key into Key 1 (required minimum):
- Click in the Key 1 text field
- Paste your API key (Ctrl + V or Cmd + V)
- Example:AIzaSyBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- Keys 2-5 are optional. Any empty field automatically falls back to Key 1. -
Optionally add separate keys for other feature groups:
- Paste different API keys in Keys 2-5 if you have them
- This prevents quota from being shared across features
- Get additional free keys at Google AI Studio (you can create multiple projects) -
Optionally configure the model:
- Find the "Gemini Model" field
- Default isgemini-2.5-flash(good balance of speed and quality)
- Change if needed -
Save your configuration:
- Click the "Simpan Konfigurasi" (Save Configuration) button
- Wait for the confirmation message
- Your API key is now active immediately -- no restart required
Automatic fallback for RPH: If Key 1 runs out of quota (Error 429), the system automatically switches to another available RPH key -- no interruption needed.
Step 5 (Recommended): Verify Your Key with the "Semak" Button
Starting from v2.29.0, each key slot (1–5) has a "Semak" (Check) button next to it. Click it to verify the key is valid without generating anything or using any AI quota — it makes a lightweight metadata call directly to Google.
When to use it:
- Before saving a new key — paste the key into a slot, click "Semak" first, then click "Simpan Konfigurasi" only if it shows "Kunci sah" (Key valid).
- After a generation fails with "API key not valid" — leave the field empty and click "Semak" on each slot to find out which stored key is broken. This is much faster than guess-and-check with full RPH/RPT generations.
Possible results:
- Kunci sah — the key is valid and ready to use.
- Kunci ini tidak sah atau telah dibatalkan — the key is invalid, revoked, or the GCP project was deleted. Create a new one at aistudio.google.com/apikey.
- Kunci sah, tetapi kuota telah dicapai — the key is valid but has hit its daily/per-minute quota. Try again later, or use a different slot.
- Tidak dapat sambung ke Google — network issue on your side. Check your internet connection and retry.
Verify It's Working
- Go to the RPT or RPH generation page
- Try generating a plan
- If it works, you are all set!
- If you get an error, check the troubleshooting section below
Security & Best Practices
Keep Your API Key Safe
DO:
- Keep it private like a password
- Store it in a secure password manager
- Delete it from browser downloads folder after saving
DON'T:
- Share it with others
- Post it online or in screenshots
- Commit it to GitHub or version control
- Email it to yourself
If Your Key Is Compromised
If you accidentally exposed your API key:
- Go to: https://aistudio.google.com/app/apikey
- Find your key in the list
- Click the trash icon to delete it
- Create a new API key
- Go to Settings in PintarRPH Web, paste the new key into Key 1 (and any other affected fields), and click "Simpan Konfigurasi"
Free Tier Limits
Google Gemini API free tier includes generous rate limits.
Free Tier Quota (as of 2026):
- 20 requests per day (RPD) for gemini-2.5-flash
- 5 requests per minute (RPM) for gemini-2.5-flash
PintarRPH App Limits (aligned with free tier):
- 20 RPT per day
- 20 RPH per day
For typical teaching plan generation:
- RPH Weekly: 2 calls per teaching day (e.g., 5 days = 10 calls)
- RPT Annual: ~2 calls per plan
- DSKP, BukuText, Calendar: 0 calls (pre-bundled / auto-configured)
The app limit matches the Gemini free tier to ensure sustainable operation.
Want to understand API usage in detail?
See: GEMINI_API_USAGE.md for a complete breakdown of how each feature uses the API.
If You Exceed Free Tier
You will get an error message like: "Rate limit exceeded" or "Quota exceeded"
Solutions:
1. Wait a minute and try again (if you hit the per-minute limit)
2. Wait until tomorrow (if you hit the daily limit)
3. Upgrade to paid tier (optional, only if you need more)
Troubleshooting
"Invalid API Key" Error
- Copy the key again from Google AI Studio -- make sure you get all characters
- Trim any spaces: the key should start with "AIza"
- Create a new API key if the old one was deleted
"API Key Not Set" Error
- Go to Settings (Tetapan Sistem) in PintarRPH Web
- Check if your API key is entered in the Key 1 field
- Make sure the key is complete (starts with "AIza")
- Click "Simpan Konfigurasi" to save
"Rate Limit Exceeded" Error
- Wait 1 minute (if you hit the per-minute limit)
- Wait until tomorrow (if you hit the daily limit)
- Generate plans in smaller batches
- Consider adding separate keys to Keys 2-5 to spread quota across features
"Model Not Available" Error
- Check the Gemini Model setting in Settings
- Default is
gemini-2.5-flash-- change if needed - Verify your API key is still valid at https://aistudio.google.com/app/apikey
Quick Summary
- Go to https://aistudio.google.com/app/apikey
- Sign in with your Google account
- Click "Create API key in new project"
- Copy the API key
- Log in to PintarRPH Web at https://pintarrph.com
- Go to Settings (Tetapan Sistem)
- Paste your API key into the Key 1 field under "Kunci API Gemini"
- Click "Simpan Konfigurasi" (Save Configuration)
- Start generating teaching plans!
Checklist
- [ ] Created Google account (if you do not have one)
- [ ] Visited Google AI Studio
- [ ] Created API key in new project
- [ ] Copied and saved API key securely
- [ ] Logged in to PintarRPH Web
- [ ] Opened Settings (Tetapan Sistem)
- [ ] Pasted API key into Key 1 field
- [ ] Clicked "Simpan Konfigurasi" to save
- [ ] Tested by generating a plan
- [ ] Verified it works without errors
Related Documentation
- QUICKSTART.md - Getting started with PintarRPH Web
- USER_GUIDE.md - Complete user guide
- GEMINI_API_USAGE.md - Understanding API usage and call breakdown
- FAIR_USAGE_POLICY.md - Daily generation limits and best practices
- LICENSE_ACTIVATION.md - License activation process
- LIMITATIONS.md - System limitations and workarounds
Need Help?
Gemini API Issues
Google AI Studio:
- Visit: https://ai.google.dev/gemini-api/docs
- Check: https://ai.google.dev/gemini-api/docs/api-key
PintarRPH Support:
- Email: [email protected]
- Include: Error message and screenshots
Last Updated: April 2026
Platform: PintarRPH Web (https://pintarrph.com)
Gemini Model: gemini-2.5-flash
PintarRPH Desktop Version: 2.48.3