parallel_grounding.py
Run the Example
1
Set up your virtual environment
2
Install dependencies
3
Export environment variables
4
Authenticate with Google Cloud
Sign in with Application Default Credentials:
5
Configure Parallel access
Subscribe to Parallel through Google Cloud Marketplace, or create a Parallel API key and export it as
PARALLEL_API_KEY in the shell that runs the example.6
Use a supported Gemini model
Replace
id="gemini-2.0-flash" with id="gemini-3.5-flash" in the saved file.7
Run the example
Save the code above as
parallel_grounding.py, then run: