Sample to analyze food images using Google Generative AI models, the API analyzes the image and returns the ingredients.
Method | Endpoint | Description |
---|---|---|
POST | /recipes | Analyze an Image URL |
Body
{
"url_image": "https://www.elsoldemexico.com.mx/incoming/ayh193-img_8339.jpg/ALTERNATES/LANDSCAPE_768/IMG_8339.jpg"
}
Method | Endpoint | Description |
---|---|---|
GET | /recipes | Analyze an image from local assets directory |
- Create a new file
.env
- Create a API key in new project Google AI Studio
- Add a new variable
API_KEY=XXXXX
to the file.env
- Install the gcloud CLI
go run cmd/*.go
- That's it!
- Google AI
- Generative AI Overview
- Introduction to Generative AI
- Google AI for Developers
- Google AI Go SDK
- Introducing Gemini
- Google AI versus Vertex AI differences
- Go Genai
- Vertex AI
- Duet AI
- Bard
Feel free to report or add any useful feature, I will be glad to improve it with your help.
- Twitter X - @ErikJhordan_Rey