This Node.js API provides a seamless interface for interacting with Google's Gemini AI API, enabling developers to leverage powerful artificial intelligence capabilities in their applications.
It uses specific information context to chat about.
Example Request
POST /
{
"prompt" : "question about topic"
}
Example Response
{
"status": "Success OK",
"message": "AI Response",
"data": {
"prompt": "question asked",
"response": "response from gemini"
}
}
- Clone this repository:
git clone https://github.com/luisvent/gemini_ai_api.git
- Install dependencies:
npm install
- Config Project:
// set your configurations
// ./config/development.json
{
"gemini_private_key": "<YOUR-GEMINI-API-KEY>",
"server": {
"host": "localhost",
"port": 3930
},
"environment": "development",
"url": "http://localhost:3930/",
"context": "<YOUR-CHAT-CONTEXT-INFORMATION>"
}
- Run project:
npm start
This project is licensed under the MIT License - see the LICENSE file for details.