To try these samples out, follow these steps:
- To use the Gemini API, you'll need an API key. If you don't already have one, create a key in Google AI Studio: https://aistudio.google.com/app/apikey.
- Export a
$GEMINI_API_KEY
environment variable with an API key with access to the Gemini generative models, or run the below commands with an environment containing this variable. - Run any sample from the
bin
directory (e.g.,dart bin/simple_text.dart
).