Basic starter for uploading images to the Gemini API. Built initially for team Pancakes at the 2025 Prewired Summer Make-a-Thon.
- Clone repository
- Run
npm i
to install dependencies - Add a .env file with
GEMINI_API_KEY=<your Gemini API key here>
- (Optional) Define the HTTP port you'd like to use in your .env file with
PORT=<your favourite number here>
- (Optional) Change Gemini's instructions on line 52 of
server.js
- Run the server with
npm start
and navigate tolocalhost:3000
(or your custom port) - Hack away!
@google/genai
- Google's library for connecting to Geminidotenv
- Allows for handling .env files for keeping your API key secretexpress
- Software for writing a JavaScript servermulter
- Extension of Express to handle uploading files (in our case, the images)nodemon
- Extension of Node that automatically restarts the server for us whenserver.js
is updated