Getting Your Gemini API Key for the AI Assistant
May 22, 2024
The AI Chat Assistant in ioCtrlMQ is powered by Google's Gemini family of models. To use its features, you need to provide your own Google AI API key. This key is stored locally in your browser and is only sent directly to Google's servers for processing your requests.
This guide will walk you through the process of getting a free API key from Google AI Studio.
Step 1: Visit Google AI Studio
Navigate to ai.google.dev in your web browser. You will need to sign in with your Google account.
Step 2: Create an API Key
- Once you are in Google AI Studio, look for the "Get API key" button. It is usually located in the top left or top right corner of the interface.
- Click on the button. This will take you to the API key generation page.
- You may be prompted to agree to the terms of service.
- Click the "Create API key" button. This will generate a new, unique API key for you.
Step 3: Copy Your API Key
A dialog box will appear showing your newly generated API key. It is a long string of random characters.
This is the only time you will be able to see the full key, so make sure to copy it now. Click the copy icon or manually select and copy the entire string.
Step 4: Add the Key to ioCtrlMQ
- Return to your ioCtrlMQ dashboard.
- Click on the AI Chat Assistant button (the robot icon) at the bottom right of the screen.
- The chat panel will open, prompting you to enter your API key.
- Paste the key you just copied from Google AI Studio into the input field.
- Click "Save API Key".
That's it! Your AI Assistant is now enabled. You can start asking it questions about your dashboard, MQTT concepts, or even ask it to perform simulated data analysis tasks.