How bagaswijaya97/geminiaiservices works
GeminiAIServices is a small ASP.NET API that exposes separate text-only and text-plus-image prompt workflows backed by Google Gemini. A client submits a prompt (and, for the image route, a file); the controller builds the Gemini request, sends it to the corresponding external API, parses the response, and returns the result or an error. The image route also compresses oversized uploads and determines their MIME type. The README describes the project as a learning integration; implementation details beyond the sampled files are not inferred.
Main entry points: TextAndImageController.cs Text + Image Endpoint · TextOnlyController.cs Text Endpoint · Program.cs ASP.NET Host · clsRequest.cs Gemini Request Models
Components 8
HTTP API
- ASP.NET Host
GeminiAIServices/Program.cs - Text Endpoint
GeminiAIServices/Controllers/TextOnlyController.cs - Text + Image Endpoint
GeminiAIServices/Controllers/TextAndImageController.cs
Request Preparation
- Gemini Request Models
GeminiAIServices/Models/clsRequest.cs - Upload Helpers
GeminiAIServices/Helpers/General.cs
Gemini Integration
- API Constants
GeminiAIServices/Helpers/General.cs - Google Gemini API
Other components
- API Client
Connections 15
- ASP.NET Host → Text Endpoint: dispatches routes
- ASP.NET Host → Text + Image Endpoint: dispatches routes
- API Client → Text Endpoint: submits prompt
- API Client → Text + Image Endpoint: submits prompt and file
- Text Endpoint → Gemini Request Models: builds request
- Text + Image Endpoint → Gemini Request Models: builds request
- Text + Image Endpoint → Upload Helpers: compresses and detects type
- Text Endpoint → API Constants: reads endpoint and key
- Text + Image Endpoint → API Constants: reads endpoint and key
- Text Endpoint → Google Gemini API: posts text request
- Text + Image Endpoint → Google Gemini API: posts multimodal request
- Google Gemini API → Text Endpoint: returns API response
- Google Gemini API → Text + Image Endpoint: returns API response
- Text Endpoint → API Client: returns result or error
- Text + Image Endpoint → API Client: returns result or error