Does Google AI Studio work with LangChain?

Hi There!

I’m just getting started with Generative AI development. I wanted to know if google ai studio api key works with langchain or do I need to have a vertex ai api-key for using Google’s gen-ai models with LangChain?

Also, just seeking clarity - Is the python sdk for vertex ai and google ai studio the same or different? I’m talking about the Gen AI SDK documentation on this link👉https://googleapis.github.io/python-genai/#

Thanks!

2 Likes

Hi @Niharika, Welcome to the forum!!

Gemini API Key works fine with langchain, so go ahead. For using Vertex AI, you need not to have any API key, you just need to authenticate with project-id and location.

This one is the new unified SDK which works fine on both the platforms with slight change. You can see the difference while creating the client.

You can also follow this quickstart colab notebook with new SDK if you have created your api-key or if you have a project in Google cloud platform.

1 Like

Thankyou @Govind_Keshari! :smile:

1 Like