Google Gemini routing

Gemini API router for Google AI and Vertex AI routes

Use Sage Router as the policy layer around Gemini-compatible traffic. Route Google AI Studio keys, Vertex AI projects, OpenAI-compatible clients, local Ollama, Anthropic-compatible routes, and private endpoints without hard-coding one provider path into every agent.

Create API key Read quickstart Browse models Integrations

Gemini-compatible routes

Serve Google AI and Vertex AI models through Sage Router's OpenAI-compatible surface, or expose Gemini-style discovery and generateContent compatibility where clients expect it.

Function-tool routing

OpenAI-style function tools are translated into Gemini function declarations, tool results stay in the conversation, and Gemini function calls return as structured OpenAI-compatible tool_calls.

429 failover

When a Gemini key, Vertex route, or fallback provider rate-limits, Sage Router can choose another eligible authorized route instead of making each agent own failover logic.

60-second Gemini router setup

export OPENAI_BASE_URL=https://api.sagerouter.dev/v1
export OPENAI_API_KEY=sk_sage_your_generated_key

curl "$OPENAI_BASE_URL/chat/completions" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sage-router/agentic",
    "messages": [{"role": "user", "content": "Route this through Gemini if it is the best healthy fit"}],
    "tools": [{
      "type": "function",
      "function": {
        "name": "lookup",
        "parameters": {"type": "object", "properties": {"query": {"type": "string"}}}
      }
    }]
  }'

Multimodal routing

Image, audio, video, and document inputs route only to capable models, and served modalities are recorded per model for better future decisions.

Multiple credentials

Credential pools can load balance and fail over across authorized Google keys or project-backed routes when one path is unhealthy.

Provider boundary

Sage Router does not grant unauthorized Gemini or Google Cloud access. Customers bring authorized provider access or use hosted keys for Sage Router account control.

Why route Gemini traffic?

Gemini is strong for multimodal and agent workloads, but production agents still need policy, fallback, key rotation, route observability, tool-call normalization, local model escape hatches, and hosted activation. Sage Router keeps Gemini in the matrix without making it the only route.

Next steps

Create an API key, copy the hosted quickstart, browse Gemini-capable routes, or request managed Gemini review.