API project leveraging Gemini AI for text prompt responses and image prompt response, with robust exception handling