Gemini JavaScript SDK Integration
Use Gemini’s JavaScript SDK to integrate with Helicone to log your Gemini AI usage.
Proxy Integration
Fetch
Create Google Generative AI API Key
Visit the Google Generative AI API Key page. Follow the instructions to create a new API key. Make sure to save the key as you will need it for the next steps.
Set API keys as environment variables
Install necessary packages
Ensure you have the necessary packages installed in your Javascript project:
Send a request using fetch
Google Generative AI SDK
Create Google Generative AI API Key
Visit the Google Generative AI API Key page. Follow the instructions to create a new API key. Make sure to save the key as you will need it for the next steps.
Set API keys as environment variables
Install necessary packages
Ensure you have the necessary packages installed in your Javascript project:
Import GoogleGenerativeAI and configure the client
Get the generative model and generate content