SETUP GUIDES · AI MODELS
Google Gemini API key
Let Claspine call Google’s Gemini models with a key from Google AI Studio.
Google offers Gemini in two ways: a simple API key from Google AI Studio (this guide), or through Vertex AI for larger companies (see the Vertex AI guide). If you are unsure, use this one.
Words you’ll see
- API key
- A long secret string that lets software use your account, like a password made for programs. Anyone who has it can spend on your account, so treat it like a password.
- Project (at the provider)
- A folder inside your provider account that groups keys, usage and limits. Using a separate one for Claspine keeps its spending and keys apart from everything else.
- Spending limit / budget
- A cap or alert you set at the provider so a mistake or abuse cannot run up an unexpected bill.
- Model
- The specific AI you call (for example a fast, cheap one or a larger, smarter one). Claspine’s AI Gateway lets you choose models and fall back to another if one fails.
Steps
- Open Google AI Studio → Get API key and sign in with your Google account.
- Click Create API key. Google asks which Google Cloud project it belongs to; choose one or let it create a new one.
- Copy the key. It starts with
AIza. - Optional but recommended: in the Google Cloud console under APIs & Services → Credentials, open the key and restrict it to the Generative Language API, so it cannot be used for anything else.
- Open the Claspine console, choose your project and go to AI Gateway.
- Under 1. Your AI provider keys, find Google Gemini (click Show all if you don’t see it) and click Add key. (The Secret Vault lists the same keys under AI Models.)
- Paste the values from the steps above and click Save key. Claspine encrypts them straight away and will only ever show the last few characters again.
- Under 2. Your AI route, choose this provider and pick a model, then save. The list comes live from your account, so you only see models you can use.
- Send a test request from your app. The usage appears on your bill at the provider, not on Claspine’s.
What goes where in Claspine
| Console field | Value |
|---|---|
| API KEY | The key you copied (starts with AIza). |
Keep it safe
- Without billing turned on, Google applies free-tier limits; with billing on, set a budget alert on the Cloud project.
- Restricting the key (step 4) means a leaked key cannot be used for other Google services.
Claspine stores the values encrypted, never shows them again in full, and never sends them to your app or SDK.
If something goes wrong
- Requests are rejected with “quota exceeded”.
- You hit the free-tier limit. Enable billing on the Cloud project or wait for the limit to reset.