• About Us
  • Disclaimer
  • Contact Us
  • Privacy Policy
Tuesday, August 4, 2026
mGrowTech
No Result
View All Result
  • Technology And Software
    • Account Based Marketing
    • Channel Marketing
    • Marketing Automation
      • Al, Analytics and Automation
      • Ad Management
  • Digital Marketing
    • Social Media Management
    • Google Marketing
  • Direct Marketing
    • Brand Management
    • Marketing Attribution and Consulting
  • Mobile Marketing
  • Event Management
  • PR Solutions
  • Technology And Software
    • Account Based Marketing
    • Channel Marketing
    • Marketing Automation
      • Al, Analytics and Automation
      • Ad Management
  • Digital Marketing
    • Social Media Management
    • Google Marketing
  • Direct Marketing
    • Brand Management
    • Marketing Attribution and Consulting
  • Mobile Marketing
  • Event Management
  • PR Solutions
No Result
View All Result
mGrowTech
No Result
View All Result
Home Google Marketing

A unified API for AI model routing

Josh by Josh
August 4, 2026
in Google Marketing
0
A unified API for AI model routing


When building AI applications, developers need the freedom to route traffic to the best model for the job without hardcoding endpoints or managing open-source proxies. Google Cloud API Gateway now offers model routing in Public Preview to solve this. It provides a lightweight, serverless ingress layer that accepts OpenAI-compatible requests and dynamically routes them to Gemini, Claude, or OpenAI OSS-GPT.

API Gateway can be used standalone for simple rate limiting and token tracking, or paired seamlessly with the Gemini Enterprise Agent Platform. For example, you can route your agent’s egress through Agent Gateway for strict security governance, and then pass the request to API Gateway to handle dynamic routing to Google-hosted LLMs. Here is a step-by-step guide on how to configure your routing logic.

Routing your traffic

Setting up your model routing logic takes just a few steps:

  1. Configure your routing rules: You can map virtual model names to specific backend targets directly in your OpenAPI 3.x specification using the new x-google-api-management extension block.
openapi: 3.0.4

info:
  title: OpenAPI 3.x spec using Model Routing
  description: Using Model Routing in an OAS 3.x spec
  version: 1.0.0

x-google-api-management:
  backends:
    gemini-35-flashlite:
      address: >-
        https://aiplatform.googleapis.com/v1/projects/YOUR_PROJECT_ID/locations/global/publishers/google/models/gemini-3.5-flash-lite:generateContent
      deadline: 60.0
      pathTranslation: CONSTANT_ADDRESS

    anthropic-claude-opus-47:
      address: >-
        https://aiplatform.googleapis.com/v1/projects/YOUR_PROJECT_ID/locations/global/publishers/anthropic/models/claude-opus-4-7:rawPredict
      deadline: 60.0
      pathTranslation: CONSTANT_ADDRESS

    openai-gpt-oss-120b:
      address: >-
        https://aiplatform.googleapis.com/v1/projects/YOUR_PROJECT_ID/locations/global/endpoints/openapi/chat/completions
      deadline: 60.0
      pathTranslation: CONSTANT_ADDRESS

  ai:
    models:
      routing:
        routers:
          # Router 1: route between Gemini (default) and Claude.
          gemini-claude-router:
            defaultModel:
              backend: gemini-35-flashlite
              targetModel: google/gemini-3.5-flash-lite
            rules:
              - model: "claude-opus-4-7"
                backend: anthropic-claude-opus-47
                targetModel: anthropic/claude-opus-4-7

          # Router 2: route between OpenAI GPT (default) and Gemini.
          openai-gemini-router:
            defaultModel:
              backend: openai-gpt-oss-120b
              targetModel: openai/gpt-oss-120b-maas
            rules:
              - model: "gemini-3.5-flash-lite"
                backend: gemini-35-flashlite
                targetModel: google/gemini-3.5-flash-lite

servers:
  - url: "https://my-gateway-url.com"

paths:
  /v1/chat/gemini-claude:
    post:
      summary: "Endpoint:defaults to Gemini & Claude as an option."
      operationId: "chatGeminiClaude"
      x-google-model-router: gemini-claude-router
      responses:
        '200':
          description: "OK"

  /v1/chat/openai-gemini:
    post:
      summary: "Endpoint:defaults to OpenAI & Gemini as an option."
      operationId: "chatOpenAIGemini"
      x-google-model-router: openai-gemini-router
      responses:
        '200':
          description: "OK"

YAML

Note: All backends referenced by a single router must share the same host (for example, aiplatform.googleapis.com). Routing selects a different model and path on that shared Vertex host — it does not route across different hosts.

2. Deploy the Gateway: Deploy your updated API config so the Gateway is active and ready to process traffic.

3. Send standard requests: Your application simply sends a standard OpenAI POST /v1/chat/gemini-claude or POST /v1/chat/openai-gemini request. The Gateway intercepts it, transcodes the payload to the native schema of the backend, and routes it on the fly. As an example (use appropriate values for $API_KEY and my-gateway-url.com) :

curl -X POST "https://my-gateway-url.com/v1/chat/gemini-claude" \
  -H "content-type: application/json" \
  -H "x-api-key: $API_KEY" \
  -d '{
        "model": "claude-opus-4-7",
        "messages": [
          {"role": "user", "content": "Introduce yourself in 5 words"}
        ]
      }'

Shell

Get started

Model routing is now available in Public Preview for API Gateway. To stop managing proxies and start unifying your AI traffic, check out our documentation to deploy your first model router today.



Source_link

READ ALSO

Google AI announcements from July 2026

Can Reddit fend off a new wave of AI SEO spam?

Related Posts

Google AI announcements from July 2026
Google Marketing

Google AI announcements from July 2026

August 4, 2026
Can Reddit fend off a new wave of AI SEO spam?
Google Marketing

Can Reddit fend off a new wave of AI SEO spam?

August 4, 2026
Your Fitbit data can now connect directly to Apple Health
Google Marketing

Your Fitbit data can now connect directly to Apple Health

August 4, 2026
Scaling real-time AI agents with session-aware load balancing
Google Marketing

Scaling real-time AI agents with session-aware load balancing

August 3, 2026
Introducing Sail Tower, our new office in Austin, Texas
Google Marketing

Introducing Sail Tower, our new office in Austin, Texas

August 3, 2026
Lenovo Googlebook leaks reveal a laptop and 2-in-1 tablet
Google Marketing

Lenovo Googlebook leaks reveal a laptop and 2-in-1 tablet

August 3, 2026
Next Post
Crayola Targets a New Demo—Adults—at a Camp-Themed Launch

Crayola Targets a New Demo—Adults—at a Camp-Themed Launch

POPULAR NEWS

Trump ends trade talks with Canada over a digital services tax

Trump ends trade talks with Canada over a digital services tax

June 28, 2025
15 Trending Songs on TikTok in 2025 (+ How to Use Them)

15 Trending Songs on TikTok in 2025 (+ How to Use Them)

June 18, 2025
Communication Effectiveness Skills For Business Leaders

Communication Effectiveness Skills For Business Leaders

June 10, 2025
Comparing the Top 7 Large Language Models LLMs/Systems for Coding in 2025

Comparing the Top 7 Large Language Models LLMs/Systems for Coding in 2025

November 4, 2025
App Development Cost in Singapore: Pricing Breakdown & Insights

App Development Cost in Singapore: Pricing Breakdown & Insights

June 22, 2025

EDITOR'S PICK

AI Chatbot Integration for Business Applications

AI Chatbot Integration for Business Applications

October 17, 2025
Cloud Migration Strategy for Enterprises in Australia Guide

Cloud Migration Strategy for Enterprises in Australia Guide

November 27, 2025
Pre-Marketing Conversations for Business Leaders

Pre-Marketing Conversations for Business Leaders

June 7, 2025
What is the best content length for SEO?

What is the best content length for SEO?

September 21, 2025

About

We bring you the best Premium WordPress Themes that perfect for news, magazine, personal blog, etc. Check our landing page for details.

Follow us

Categories

  • Account Based Marketing
  • Ad Management
  • Al, Analytics and Automation
  • Brand Management
  • Channel Marketing
  • Digital Marketing
  • Direct Marketing
  • Event Management
  • Google Marketing
  • Marketing Attribution and Consulting
  • Marketing Automation
  • Mobile Marketing
  • PR Solutions
  • Social Media Management
  • Technology And Software
  • Uncategorized

Recent Posts

  • GeoGuessr Daily Challenge Answer Today for August 4, 2026
  • Xbox’s Free 25th Anniversary Gifts Include A Dynamic Theme And Avatars
  • Why Buying Groups Change Everything
  • LLM Evaluation Frameworks Compared: How to Actually Measure What Your Model Does
  • About Us
  • Disclaimer
  • Contact Us
  • Privacy Policy
No Result
View All Result
  • Technology And Software
    • Account Based Marketing
    • Channel Marketing
    • Marketing Automation
      • Al, Analytics and Automation
      • Ad Management
  • Digital Marketing
    • Social Media Management
    • Google Marketing
  • Direct Marketing
    • Brand Management
    • Marketing Attribution and Consulting
  • Mobile Marketing
  • Event Management
  • PR Solutions