You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An API key is required to use Google's Gemini API. Follow the instructions below. The app will not run without a .env file (Node.js) or settings.py (Python).
Create API key and set in settings.py file as API_KEY = <YOUR_API_KEY> ... you can alternatively put it into .env and use python-dotenv, similar to the Node version.
Run python main.py (or python3)
📝 Gemini API also accessible from GCP Vertex AI
While these sample apps access the Gemini API from Google AI, a great place for beginners and those experimenting with it, the API is also accessible from GCP's Vertex AI platform for those ready to use Gemini for production workloads. To learn more about calling the Gemini API from either (or both) places, see my "A better Gemini API 'Hello World!' sample" post, the first in my multi-part series on the Gemini API.