It is the entry point to the Gemini API. For new users, AI Studio creates a Google Cloud project and a key automatically, and the usage dashboard shows consumption without opening the Cloud console. The official examples use the GEMINI_API_KEY variable (or GOOGLE_API_KEY, which wins if both are set), and the client libraries pick it up on their own.
The key is where most trouble starts. The docs themselves say: do not commit it, do not embed it in client-side web or mobile apps (use a backend proxy), restrict it to the Gemini API only and set up billing alerts. If it leaks, create a new one, deploy it, and only then disable the old one.
The less obvious trap is the free tier. In the official table, free tier usage is marked as used to improve Google products, and paid tier usage is not. For a prototype with made-up data, fine; with customer data, use the paid tier.