npm
npmjs.com › package › @google › genai
google/genai
1 week ago - import { GoogleGenAI } from '@google/genai'; const ai = new GoogleGenAI({ enterprise: true, project: 'your_project', location: 'your_location', }); For NodeJS environments, you can create a client by configuring the necessary environment variables. Configuration setup instructions depends on whether you're using the Gemini Developer API or the Gemini Enterprise Agent Platform.
» npm install @google/genai
Published Jun 24, 2026
Version 2.10.0
npm
npmjs.com › package › @google › generative-ai
google/generative-ai
April 29, 2025 - Google AI JavaScript SDK. Latest version: 0.24.1, last published: a year ago. Start using @google/generative-ai in your project by running `npm i @google/generative-ai`. There are 1945 other projects in the npm registry using @google/generative-ai.
» npm install @google/generative-ai
Published Apr 29, 2025
Version 0.24.1
Videos
11:02
How to Use Gemini AI API with Node JS Express REST Endpoint and ...
06:32
How to Use Gemini AI API with Node JS Javascript | Latest 2025 ...
- YouTube
28:14
Create a Chatbot with Node.js, Express & Google Generative AI | ...
08:40
Google Gemini AI API - JavaScript & Node JS Tutorial - YouTube
04:23
Using Google's Gemini API with Node.js - YouTube
GitHub
github.com › mohitejaikumar › generative-ai-js
GitHub - mohitejaikumar/generative-ai-js: The official Node.js / Typescript library for the Google Gemini API · GitHub
The official Node.js / Typescript library for the Google Gemini API - mohitejaikumar/generative-ai-js
Author mohitejaikumar
Rishav's Blog
rishavd3v.hashnode.dev › google-gemini-with-nodejs
Google Gemini Generative AI Integration in Node JS
August 31, 2025 - const dotenv = require("dotenv").config(); const { GoogleGenerativeAI } = require("@google/generative-ai"); const genAI = new GoogleGenerativeAI(process.env.API_KEY); const model = genAI.getGenerativeModel({ model: "gemini-1.5-flash"}); const generateContent = async (req,res)=>{ try{ const prompt = "Create 5 funny and witty jokes about generative AI"; const result = await model.generateContent(prompt); const response = await result.response; const text = response.text(); res.send(text); } catch(err){ console.log(err); res.send("Unexpected Error!!!"); } } module.exports = generateContent; Here we are using gemini-1.5-flash model.
Medium
medium.com › @pvnsripati › i-built-an-ai-that-interviews-you-with-node-js-and-google-gemini-api-2ffb9d4bdffc
I Built an AI That Interviews You using Node.js and Google Gemini API | by Praveen Sripati | Medium
June 20, 2025 - // Import the Google AI client const { GoogleGenerativeAI } = require('@google/generative-ai'); const genAI = new GoogleGenerativeAI(process.env.GEMINI_API_KEY); // Define a generation config with a high temperature for unique responses const generationConfig = { temperature: 0.9, }; // Initialize the model WITH the new generation configuration const model = genAI.getGenerativeModel({ model: "gemini-1.5-flash", generationConfig: generationConfig, // Pass our new config here });
GitHub
github.com › googleapis › js-genai
GitHub - googleapis/js-genai: TypeScript/JavaScript SDK for Gemini and Vertex AI. · GitHub
April 25, 2026 - import { GoogleGenAI } from '@google/genai'; const ai = new GoogleGenAI({ enterprise: true, project: 'your_project', location: 'your_location', }); For NodeJS environments, you can create a client by configuring the necessary environment variables. Configuration setup instructions depends on whether you're using the Gemini Developer API or the Gemini Enterprise Agent Platform.
Starred by 1.6K users
Forked by 251 users
Languages TypeScript 94.3% | JavaScript 5.1% | HTML 0.3% | Shell 0.2% | Starlark 0.1% | CSS 0.0%
Google
codelabs.developers.google.com › codelabs › deploy-from-github › gen-ai-nodejs
Automatically Deploy Generative AI Node.js Web Application from Version Control to Cloud Run | Google Codelabs
gh repo create codelab-genai --private If you receive the error:
npm
npmjs.com › package › @google-ai › generativelanguage
google-ai/generativelanguage
January 29, 2026 - Generative Language API client for Node.js. Latest version: 3.7.1, last published: a month ago. Start using @google-ai/generativelanguage in your project by running `npm i @google-ai/generativelanguage`. There are 36 other projects in the npm registry using @google-ai/generativelanguage.
» npm install @google-ai/generativelanguage
Published May 01, 2026
Version 3.7.1
npm
npmjs.com › package › @zdooon › google-genai
@zdooon/google-genai - npm
November 27, 2025 - import { GoogleGenAI } from '@google/genai'; const ai = new GoogleGenAI({ vertexai: true, project: 'your_project', location: 'your_location', }); For NodeJS environments, you can create a client by configuring the necessary environment variables. Configuration setup instructions depends on whether you're using the Gemini Developer API or the Gemini API in Vertex AI.
» npm install @zdooon/google-genai
Published Nov 27, 2025
Version 1.30.0
npm
npmjs.com › package › @google › generative-ai › v › 0.8.0
Google AI JavaScript SDK
April 22, 2024 - The Google AI JavaScript SDK enables developers to use Google's state-of-the-art generative AI models (like Gemini) to build AI-powered features and applications. This SDK supports use cases like: ... You can use this JavaScript SDK for applications ...
» npm install @google/generative-ai
Published Apr 29, 2025
Version 0.8.0
Medium
medium.com › @pvnsripati › prompt-engineering-in-action-examples-using-google-gemini-node-js-a75253f852e1
Prompt Engineering in Action: Examples using Google Gemini & Node.js | by Praveen Sripati | Medium
June 15, 2025 - // gemini-codebook.js require('dotenv').config(); // Load environment variables const { GoogleGenerativeAI } = require('@google/generative-ai'); const API_KEY = process.env.API_KEY; if (!API_KEY) { console.error("API_KEY not found in .env file. Please create a .env file with API_KEY=YOUR_GEMINI_API_KEY"); process.exit(1); } const genAI = new GoogleGenerativeAI(API_KEY); const model = genAI.getGenerativeModel({ model: "gemini-pro" }); // Using gemini-pro for text tasks /** * Calls the Google Gemini API with a given prompt and optional model parameters.
Google AI
ai.google.dev › gemini api › gemini api libraries
Gemini API libraries | Google AI for Developers
April 28, 2026 - The Google GenAI SDK is available for the Python, JavaScript/TypeScript, Go and Java languages.
Google
developers.google.com › solutions › getting started with the gemini api and web apps
Getting started with the Gemini API and Web apps | Solutions for Developers | Google for Developers
Explore Google AI Studio and the capabilities of the Gemini generative AI model. Learn how to design and test the different types of prompts (freeform, structured, and chat), get an API key, and build a simple NodeJS application.
Tessl
tessl.io › registry › tessl › npm-google--genai › 1.30.0 › files › docs › client.md
1.30.0 • npm-google--genai • tessl • Registry • Tessl
1 month ago - import { GoogleGenAI } from '@google/genai/node'; // With API key const client = new GoogleGenAI({ apiKey: 'YOUR_API_KEY' }); // With Vertex AI and Application Default Credentials const vertexClient = new GoogleGenAI({ vertexai: true, project: 'my-project-id', location: 'us-central1' });
Fek
fek.io › blog › using-googles-gemini-generative-ai-with-node-js
Using Google's Gemini Generative AI with Node.js - FEK.IO
import { GoogleGenerativeAI, HarmCategory, HarmBlockThreshold } from "@google/generative-ai"; const MODEL_NAME = "gemini-pro"; const API_KEY = process.env.GEMINI_API_KEY; async function run() { const genAI = new GoogleGenerativeAI(API_KEY); const model = genAI.getGenerativeModel({ model: MODEL_NAME }); const generationConfig = { temperature: 0.9, topK: 1, topP: 1, maxOutputTokens: 2048, }; const safetySettings = [ { category: HarmCategory.HARM_CATEGORY_HARASSMENT, threshold: HarmBlockThreshold.BLOCK_MEDIUM_AND_ABOVE, }, { category: HarmCategory.HARM_CATEGORY_HATE_SPEECH, threshold: HarmBlockTh
Apidog
apidog.com › blog › how-to-use-the-google-gen-ai
How to Use the Google Gen AI TypeScript/JavaScript SDK ...
January 30, 2026 - import { GoogleGenAI } from '@google/genai'; const ai = new GoogleGenAI({ vertexai: true, project: 'your-gcp-project-id', location: 'your-gcp-location', // e.g., 'us-central1' }); async function runVertex() { // Example: Generate text content with Vertex AI const model = ai.models.generateContent({ model: "gemini-1.5-pro-preview-0409", // Example Vertex AI model contents: [{ role: "user", parts: [{ text: "What are the benefits of using Vertex AI with the Gen AI SDK?"