Gemini is one of the most powerful LLM Models available for free.  This AI model can write text and code for you. To use Gemini, you need a special key called an API key. You can get this key for free by following a few steps. There are different plans for using Gemini, some free and some that you have to pay for. 

The free plans limit how much you can use Gemini, but the paid plans don't have any limits. There are also some things to keep in mind when using Gemini, like the fact that it works well only with English for now and many more. We will discuss all those and also how to easily get your Gemini API key in simple steps. So let's get started.

Account Creation 

The Google Gemini API key unlocks access to their powerful generative AI model. It acts like a secret handshake, letting your code interact with Gemini's text and code generation features. You'll need one to experiment with Gemini through Google AI Studio or integrate it into your projects.

Here's how to create a Gemini API Key:

Step 1: Search on Google “ Google AI for Developers “ 

Step 2: You get a list of search results related to Gemini and Google. In those, select "Get Started with the Gemini API" or follow this link.

How to get Gemini API Key

Step 3: After you reach the above homepage screen, click on the "Get API key in Google Ai Studio" option, and you will directly access the dashboard of the Ai Studio.

How to get Gemini API Key

Step 4: Next, you will see the above screen, and in there, select "Get API Key" to create the Google API key directly.

How to get Gemini API Key

Step 5: That’s it now you can create different API keys according to your Gemini Plan. 

Cost 

The cost of the Gemini changes according to the Gemini models you use. If you use the Gemini 1.0 Pro, there will be one cost, and if you use the Gemini 1.5 Pro, you get one cost. 

However, for free plans of the Gemini, no matter the model you use, your chat information is used to train the Gemini models. So if you have privacy concerns, we recommend choosing either a paid plan or not sharing any personal information in the Gemini.

Gemini 1.0 Pro 

Plan 

Free of Charge Plan 

Pay-as-you-go plan 

Requests Per Minute 

15 RPM

360 RPM 

Tokens Per Day 

32,000 TPM 

120,000 TPM 

Requests Per Day  

1,500 RPD 

30,000 RPD 

Input Price 

Free 

$0.50/1 Million Tokens

Output Price 

Free 

$1.50/1 Million Tokens 

Data Used to Improve Gemini 

Yes 

No 

Gemini 1.5 Pro 

Plan 

Free of Charge Plan 

Pay-as-you-go plan 

Requests Per Minute 

2 RPM

360 RPM 

Tokens Per Day 

32,000 TPM 

2 Million TPM

Requests Per Day  

50 RPD 

10,000 RPD 

Input Price 

Free 

$3.50 / 1 million tokens (for prompts up to 128K tokens)

Output Price 

Free

$7.00 / 1 million tokens (for prompts longer than 128K)

Data Used to Improve Gemini 

Yes 

No 

Gemini 1.5 Flash

Plan 

Free of Charge Plan 

Pay-as-you-go plan 

Requests Per Minute 

15 RPM 

1000 RPM

Tokens Per Day 

1 Million TPM 

2 Million TPM 

Requests Per Day  

1,500 RPD 

Nil 

Input Price 

Free 

$0.35 / 1 million tokens (for prompts up to 128K tokens)

Output Price 

Free

$0.70 / 1 million tokens (for prompts longer than 128K)

Data Used to Improve Gemini 

Yes 

No 

Check out Elephas. Elephas is an AI writing assistant for Mac that lets you use powerful AI tools like Gemini and Claude. It helps you write better, brainstorm ideas, and even translate languages. Elephas can save you 3 hours of work each day by automating tasks and making your workflow faster and easier.With Elephas, you can use major AI model APIs such as Calude, Grok, Gemini, ChatGPT, etc. Alternatively, you can also use local LLM models to safeguard your information.

It is the most productive tool for the Mac, and you can download right now for free (with some limitations).

Common Errors in Gemini API 

There are some common errors that you might face while using the Gemini API. Here are some of the error codes that you might see while using the Gemini API, along with a quick fix and an explanation of the error.

Code

Description

Reason

Fix

400

Bad Request Body

Malformed request

Check API references for format, examples, and supported versions. Don't use features from newer versions with older API endpoints.

403

Permission Denied

API key missing or lacks permission

Verify your API key is set up correctly and has the necessary access.

404

Not Found

Requested resource not found

Double-check that all request parameters are valid for your current API version.

429

Rate Limit Exceeded

Too many requests in a short time

Stay within the model's rate limit. If needed, request a quota increase.

500

Internal Server Error

Unexpected error on Google's side

Wait a bit and try again. If it persists, report it using the Send Feedback button in Google AI Studio.

503

Service Unavailable

Service overloaded or down

Wait a bit and try again. If it persists, report it using the Send Feedback button in Google AI Studio.

Other Issues to Keep In Mind

Mobile and AI Studio: The AI Studio website isn't optimised for mobile devices yet.

Language Support: The API only works with English prompts. Using other languages might cause issues.