Is there a difference?

I’m a beginner, I apologize in advance if this is a stupid question.

The Google API key for Gemini can be used in two ways:

  1. import google.generativeai as genai
  2. from google import genai

I’ve always used the first one - is there a difference in limits and charges? Since I’m using Flash which has 1500 RPD, are the rules the same for the second method? If so, what’s the actual difference between them?


In the attached screenshot, method 1 is on the left, method 2 is on the right.

Hi @Dawid_M,

The limits and charges remain same for both SDKs. The second one is the new SDK, which provides a unified interface to the Gemini model through both the Gemini Developer API and the Gemini Enterprise API (Vertex AI).

You can also go through the quickstart notebook.

Thanks

1 Like

Thank you for the guidance.