1import { GoogleGenAI } from '@google/genai';
2
3const genAI = new GoogleGenAI({
4 apiKey: 'YOUR_PROXY_API_KEY',
5 httpOptions: {
6 baseUrl: 'http://localhost:9090/api/gproxy/gemini',
7 },
8});
9
10// Generate content
11const response = await genAI.models.generateContent({
12 model: 'gemini-2.0-flash',
13 contents: 'Count from 1 to 10',
14});
15
16console.log(response.text);