how to get a Gemini API key
Web design, SEO & AI articles

How to Get a Gemini API Key

Article / JK Dreaming
How to Get a Gemini API Key

If an app asks for a Gemini API key, you can get one from Google AI Studio. An API key is a private code that lets the app use Gemini through your Google project. You’ll need access to the Google account that should own the key and the app or setup instructions that asked for it.

1. Open Google AI Studio and sign in

Open the Google AI Studio API Keys page. If Google asks you to sign in, choose the account that should manage the key. For a company setup, use the account your company has designated. If it’s your first visit, Google may ask you to review its terms before you continue.

2. Look for a starter key

Once the API Keys page opens, look at the list. Google may have already created a key and a starter project for you. If that key belongs to the project you want to use and your setup instructions allow it, skip to step 4.

3. Create a key if you need a new one

  1. Click Create API key.
  2. If Google asks you to name the key, use a name you’ll recognize later, like the name of the app you’re connecting.
  3. Choose the project that should own the key. A project is how Google groups keys, usage, and billing. For a work app, use the project your team gives you. If you’re setting up your own app and Google offers to create a project, you can follow that prompt.
  4. Finish the prompt and look for your new key in the list.

4. Copy the key and paste it into your app

Find the key you want to use and click its copy icon. Go back to the app you’re setting up and paste the key into its Gemini API Key field or the private settings field named in your setup instructions. Save it, then run the app’s connection test if it has one.

Keep the key private, like a password. If someone is setting up the app for you, ask for their secure way to receive it. Leave it out of email, chat, and screenshots. If the key is exposed, replace it in the app and delete the exposed key in Google AI Studio. See Google’s guide to managing Gemini API keys.

Do I need to set up billing?

If your project is eligible for Google’s Free Tier and your app can use a model included in it, you can start without enabling paid billing. Some models and higher usage limits require a paid tier. If your app asks you to turn on billing, check which model it needs and review Google’s current pricing before continuing. See Google’s Gemini API billing guide.

If you get stuck

  • Can’t find the project? Check which Google account you’re signed in with. If the project already exists in Google Cloud, open Projects in the AI Studio dashboard and choose Import projects to add it to the list.
  • Google says you can’t create a key? Ask the person who manages the project to check your access.
  • The app says the key is invalid? Copy the key again from Google AI Studio and paste it straight into the app’s key field. If you still get an error, share the error message with the person helping you set up the app, with the key hidden.

Ready to Grow Your Business Online?

Let's discuss how we can help you achieve your digital marketing goals.

Related Articles

Explore more insights and strategies for growing your business online.