How to get an AI API key: Gemini, OpenAI and OpenRouter
Updated November 2, 2026
The OfficeX AI chat can run on your own AI API key. Then the AI tokens cost you no OfficeX credits: you pay the AI company directly, at its price.
This guide shows how to get a key from three providers. Each part has a short video and written steps. Then it shows where to paste the key in OfficeX.
Which provider to pick
| Provider | Good for | Cost |
|---|---|---|
| OpenRouter | The OfficeX default. Hundreds of models with one key. | Prepaid credits |
| Google Gemini | A free start with the Google account that you already have. | Free tier with low limits, then pay as you go |
| OpenAI | Teams that already pay for the OpenAI API. | Prepaid credits, $5 minimum |
If you are not sure, pick OpenRouter. OfficeX fills in a good default model for each provider.
1. Google Gemini
Video: Google for Startups · Open on YouTube
- Go to aistudio.google.com/apikey.
- Sign in with your Google account.
- Click Create API key. Pick a Google Cloud project, or let Google AI Studio make one for you.
- Copy the key. A Gemini key starts with
AIza.
Free tier or paid tier. The free tier has low rate limits, so a long chat with many app calls can stop with “rate limited”. Google can also use free-tier data to make its products better. For business use, turn on billing for the project in Google AI Studio.
2. OpenAI
Video: 9x · Open on YouTube
- Go to platform.openai.com and sign in. You can use your ChatGPT login.
- Open Settings → Billing. Add a card and buy credits. The minimum is $5.
- Open API keys and click Create new secret key.
- Give the key a name, for example “OfficeX”. Click Create secret key.
- Copy the key now. OpenAI shows it only one time. An OpenAI key starts with
sk-.
A ChatGPT Plus plan does not pay for the API. The API has its own credits. Without credits, the key gives the error “quota exceeded”.
3. OpenRouter
Video: AIdeal Academy · Open on YouTube
- Go to openrouter.ai and sign in.
- Open Credits and add credits.
- Open Keys and click Create key.
- Give the key a name. You can also set a credit limit for this key.
- Copy the key now. OpenRouter shows it only one time. An OpenRouter key starts with
sk-or-.
Add the key to OfficeX
- Open the OfficeX AI chat.
- Below the list of chats, click AI settings.
- Pick the Provider: OpenRouter, ChatGPT (OpenAI) or Gemini.
- Paste the key in API key. Keep the default Model.
- Click Save. OfficeX checks the key before it saves it.
We keep the key encrypted, and you see only its last four characters. The chat then shows “Your key ending …”. To go back to the OfficeX model, open AI settings and click Remove my key.
Your own key pays only for the AI model. A new app connection, for example Gmail or HubSpot, still costs OfficeX credits one time.
Keep your key safe
- Treat the key like a password. Do not send it in email or chat.
- Set a spend limit at the provider: a credit limit on the OpenRouter key, a project budget at OpenAI, or a budget alert in Google Cloud.
- Use one key for each app. Then you can stop one app and keep the others.
- If a key leaks, delete it at the provider. Then make a new key and paste it in OfficeX.
If the key does not work
| Error | Fix |
|---|---|
| Key rejected | Copy the full key again, with no space at the start or end. Make sure that you did not delete the key at the provider. |
| No credits or quota exceeded | Add credits at OpenAI or OpenRouter, or turn on billing for the Gemini project. |
| Rate limited | Wait some minutes and try again. A Gemini free-tier key has low limits: turn on billing to raise them. |
| Model not found | Pick the provider again so that OfficeX fills in its default model. |
The videos are from other creators. The screens at each provider change often, but the steps stay the same. OfficeX is not part of Google, OpenAI or OpenRouter.