Very Important: Set a $1 Spending Limit!
Before you do anything else, please set a spending limit of about $1 on your Gemini account. This protects you in case your key is ever stolen, leaked, or used too much. You will see how to do this in the steps below. Do not skip this part.
What is Gemini?
Gemini is Google's AI. It is the AI that writes the blog posts for you in AlphaPost. To use Gemini, you need a key, called an API key.
Google gives free Gemini access. The free limits are big enough for most users.
Free limits
- 15 requests per minute.
- 1,500 requests per day.
- Each blog post uses 1 to 3 requests.
So you can make about 500 posts per day on the free tier. Most users only make 1 to 5 posts per day, so the free tier is more than enough.
Step 1: Make a Gemini API key
Open this link in a new tab: https://aistudio.google.com/app/apikey
Sign in with your Google account if asked.
Click the button that says "Create API Key" or "Get API Key".
Pick a project. If you do not have one, it will make a new one for you.
A long key will appear. It starts with "AIzaSy" and is about 39 characters long.
Copy this key. Save it somewhere safe. You will paste it into AlphaPost in a minute.
Step 2: Add a $1 spending limit (very important)
Even though the AI has a free tier, you should add a small spending limit. This stops a huge bill if your key is ever leaked or used too much.
Here is how:
- Open Google Cloud Billing.
- Click on your billing account (or make one if you do not have one).
- On the left side, click Budgets & alerts.
- Click Create budget.
- Give the budget a name like "AlphaPost Gemini Limit".
- Pick your project.
- Set the budget amount to $1 (one US dollar).
- Add an alert at 50%, 90%, and 100% so you get an email if you ever get close.
- Save.
Now, even if something goes wrong, you will get warning emails and your max risk is just $1.
Step 3: Restrict the key (extra safety)
Make your key safer by saying it can only be used for Gemini and nothing else.
- Open Google Cloud Credentials.
- Click on the key you just made.
- Under "API restrictions", pick Restrict key.
- From the list, pick Generative Language API.
- Save.
Now this key can only do AI calls. If it gets leaked, it cannot be used to do other bad things in your account.
Step 4: Add the key to AlphaPost
Go to your AlphaPost dashboard. Click Auto Post. Click New Order.
In Step 2, paste your Gemini API key in the input box. Click Continue.
AlphaPost saves your key in encrypted form. From now on, the AI uses this key when it writes posts for you.
What if I lose my key?
Make a new one. Go back to Google AI Studio and click "Create API Key" again. Then update it in AlphaPost. The old key still works until you delete it from AI Studio.
What if my key is leaked?
Right away:
- Go to Google AI Studio.
- Find the leaked key and click the trash icon to delete it.
- Make a new key.
- Update it in AlphaPost.
- Check your Google Cloud Billing for any odd charges (you set a $1 limit, so the damage is small).
Tips for safe API use
- Do not paste your key in chat apps, screenshots, or social media.
- Do not share your screen with the key visible.
- Keep the $1 spending limit at all times.
- Restrict the key to only the Generative Language API.
- Make a new key every few months for extra safety.
Need help?
If anything in this guide is not clear, email us at contactalphapost@gmail.com. We can walk you through it.