Generative Language API is not enabled

Hello.
I wanted to create an api key from “Google Studio” for my project that is local (not on google cloud) but every time I click on “Create api key” it shows the below error:

Failed to generate API key, The Generative Language API is not enabled. Please enable the API and try again.

I also have read documentation named “API quickstart” but there wasn`t anything useful for me.
I appreciate any tips and solutions.

Hi @Amir_Mahdi_Javaheria
Welcome to the Google AI Forum!!!

Which location you are based of?? Are you using free tier or trying to create API key under some project??

Thanks!

Hello
yes . I`m using free tier.

Hello,

Have you created any project? If you don’t have any projects created yet, you must either create a new project or import one from Google Cloud into Google AI Studio, or Google AI Studio creates a default Google Cloud Project and API Key, for ease of use.

Thanks!