I have generated a api key at Google but when I use that key for the App lab LLM brick, it give me a 400 error. I created a second key but same error.
This the error message:
LLM error: Response generation failed: 400 INVALID_ARGUMENT. {'error': {'code': 400, 'message': 'API key not valid. Please pass a valid API key.', 'status': 'INVALID_ARGUMENT', 'details': [{'@type': 'type.googleapis.com/google.rpc.ErrorInfo', 'reason': 'API_KEY_INVALID', 'domain': 'googleapis.com', 'metadata': {'service': 'generativelanguage.googleapis.com'}}, {'@type': 'type.googleapis.com/google.rpc.LocalizedMessage', 'locale': 'en-US', 'message': 'API key not valid. Please pass a valid API key.'}]}}
This is with the example in version 0.8.0 of App Lab.
I just went through obtaining a Google API key, and I doubt any sentient being could make it more convoluted. Mine was in the area of geo NOT AI, so my instructions likely won't help, but if you did not arrive at a weirdly misnamed panel where you select the data you want access to but is named backwards, then you likely followed a wrong path. Try using an AI to give you step by step instructions.
I am not sure why i am referred to as a sentiment being but am completely in possession of my marbles and know what i am doing.
Having said that do you care to explain were you think i went wrong apart from using the correct Google Developers site to obtain a AI api key?
Thanks,
Pieter
I was not referring to just you, but to all sentient NOT sentiment beings (my poor attempt at humour). I don;t know what mables are, but glad to hear you are in possesion of same.
My remarks were triggered by the fact that when I was looking into purchasing a Lightroom plugin to do geo analyses of my photos the author mentioned how difficult it was to maneuver the API site. His instructions were close as Google had changed things as they always do but close enough I was able to make some lucky guesses that were right. The ONLY way I have any confidence I guessed right is the fact that the plugin is doing it's job after a fashion. I do get taken to Google earth but to the wrong location. I have been busy so have not read all the docs to see if maybe I am supposed to enter some config data like maybe my location to 'anchor' the calculation maybe.
Does that make more sense for you?
Hi @horssenp. I'll provide instructions you can follow to create an API key to use Google Gemini with the "Cloud LLM" Brick in your Arduino Apps:
- Click the following link to open the "API Keys" page of Google AI Studio in your web browser:
https://aistudio.google.com/app/api-keys
- If you are not already logged into your Google account, log in.
- Click the "Create API key" button at the top right hand corner of the "API Keys" page.
The "Create a new key" dialog will open.
- Enter a meaningful name in the "Name your key" field in the "Create a new key" dialog.
- Click on the menu under the "Choose an imported project" section of the dialog.
A menu will open.
- Select "+ Create project" from the menu.
The "Create a new project" dialog will open.
- Enter a meaningful name in the "Name your project" field in the "Create a new project" dialog.
- Click the "Create project" button in the dialog.
- Wait for the project to be created.
The "Create a new project" dialog will close, returning you to the "Create a new key" dialog.
- Click the "Create key" button in the dialog.
- Wait for the key to be created.
The "API key details" dialog will open.
- The API key will be shown in the "API Key" field of the dialog. Save this key to a safe place (e.g., your password manager).
You can now enter the API key you obtained in the configuration for the "Cloud LLM" brick in your Arduino App.
Thanks very much for your reply. I will follow the info and use that key.
Everything working fine.