How to generate an API key
Some Mugavari apps, such as NEET UG Exam Prep AI, have optional AI features. They use an API key from an AI provider you choose. This page shows how to create one in a few minutes and how to keep it safe.
How to generate an API keyPlay video: How to generate an API key
The video walkthrough
The video shows the whole process from start to finish. The written steps below match it and add the safety rules.
- Takes about 2 minutes
- You need an account with the AI provider
- Some providers have a free allowance; others need billing first
Create the key (Google Gemini example)
The other providers follow the same pattern ā see the table below.
Open Google AI Studio
Go to aistudio.google.com/app/apikey and sign in with your Google account.
Click "Create API key"
If asked, choose to create the key in a new project. The new key appears in the list.
Copy the key at once
Click the copy icon next to the key. Some providers show the full key only once, so copy it before you close the page.
Paste it into the app
Open the app's AI settings, choose the same provider, paste the key into the API key field and save. Check there are no spaces before or after it.
Try one question
Ask a short question in the AI feature. If it answers, the key works. If not, see the troubleshooting list below.
Where to create your key
Menu names can change, so look for "API keys" in the account or settings area. Check each provider's pricing page for current free limits.
| Provider | Create the key at | Notes |
|---|---|---|
| Google Gemini | aistudio.google.com/app/apikey | Sign in with a Google account. Usually the easiest place to start. |
| OpenAI | platform.openai.com/api-keys | "Create new secret key". Billing credit is usually needed before it works. |
| Anthropic | console.anthropic.com/settings/keys | "Create Key". Billing credit is usually needed before it works. |
| Groq | console.groq.com/keys | "Create API Key". Check the current free limits. |
| OpenRouter | openrouter.ai/keys | "Create key". Some models are free; others charge per use. |
Keep your key safe
- Treat the key like a password. Never show it in screenshots, videos or chats.
- Set a monthly spending limit in the provider's billing settings, if it offers one.
- If a key may have leaked, delete it on the provider's site and create a new one.
Where your key goes
- The app stores the key encrypted on your phone.
- Requests go straight from your phone to the provider you chose.
- Mugavari Studio never receives your key or your questions.
- Charges, limits and terms are set by the provider, not by us.
If the key doesn't work
"Invalid key" or "unauthorised"
Remove spaces at the start or end, copy the whole key again, and check you picked the same provider in the app.
"Quota" or "billing" error
The free allowance is used up or billing isn't set up. Check the provider's usage or billing page.
No answer or timeout
Check your internet connection and try again in a minute. Providers can be slow at busy times.
Still stuck? Email mugavaristudio@gmail.com with the app name, the provider and the exact message you saw. Never send your full key.