Getting a Gemini API key is completely free for most everyday use. Here's how:
Go to aistudio.google.com/apikey.
Create a new key, and copy it to the clipboard.