Skip to content

Google Gemini

Server-side:

Terminal window
GOOGLE_API_KEY=<your-ai-studio-key>
# or, for Vertex AI:
GOOGLE_APPLICATION_CREDENTIALS=/path/to/sa.json
VERTEX_PROJECT=your-gcp-project
VERTEX_LOCATION=europe-west4
from tappass import Agent
agent = Agent("https://tappass.example.com", "tp_...")
response = agent.chat("Hello", model="google/gemini-1.5-pro")
Terminal window
export OPENAI_BASE_URL=https://tappass.example.com/v1
export OPENAI_API_KEY=tp_...
from openai import OpenAI
client = OpenAI()
response = client.chat.completions.create(
model="google/gemini-1.5-pro",
messages=[{"role": "user", "content": "Hello"}],
)
  • Gemini 1.5 Pro, Flash, Flash-8B
  • Streaming + non-streaming
  • Tool calls (function calling)
  • Vision (image + video content)
  • JSON mode / schema-typed outputs

For EU residency, use Vertex AI with VERTEX_LOCATION=europe-west4 (Netherlands) or europe-west1 (Belgium). AI Studio (the GOOGLE_API_KEY path) is US-routed and should be disabled when TAPPASS_EU_DATA_RESIDENCY=true.