JS/TS SDK for Gemini and Vertex AI
Top 39.7% on sourcepulse
This TypeScript/JavaScript SDK provides access to Google's Gemini models via both the Gemini Developer API and Vertex AI. It's designed for developers building generative AI applications, offering features like streaming responses, function calling, and chat history management.
How It Works
The SDK leverages a modular design, with submodules for managing models (ai.models
), caching (ai.caches
), chat interactions (ai.chats
), file uploads (ai.files
), and real-time sessions (ai.live
). It supports Gemini 2.0 features and allows integration with external systems through function declarations.
Quick Start & Requirements
npm install @google/genai
Highlighted Details
Maintenance & Community
This SDK is Google Deepmind's primary offering for generative AI features, with older SDKs (@google/generative_language
, @google-cloud/vertexai
) no longer receiving new Gemini 2.0+ features.
Licensing & Compatibility
The SDK is developed by Google. Specific licensing details are not explicitly stated in the README, but it is intended for use with Google's AI platforms.
Limitations & Caveats
The SDK is currently in a preview launch stage, meaning it may not be feature-complete and does not come with SLAs or technical support. It is intended for testing environments. API keys should not be exposed in client-side code.
1 day ago
1 day