---
title: "Model routing with Google Cloud API Gateway"
description: "Google Cloud API Gateway adds model routing in Public Preview for AI applications that need to direct traffic among models without hardcoded endpoints or open-source proxies. The serverless ingress layer accepts OpenAI-compatible requests and uses routing rules in an OpenAPI 3.x specification, where x-google-api-management defines backends and routers map virtual model names to targets such as Gemini, Claude, or OpenAI OSS-GPT. After deployment, clients call a stable endpoint; the Gateway transcodes the request to the backend’s native schema, adds an Agent Platform authentication token, and forwards it, separating client authentication from provider credentials. The guide also notes that every backend in one router must share a host, and shows standalone routing alongside possible Agent Gateway integration for security governance."
---

# Model routing with Google Cloud API Gateway

[Google](https://yomu.fyi/company/google) · Mak Ahmad, Sanjay Pujare · Aug 4, 2026

**Type:** Tutorial

## Summary

Google Cloud API Gateway adds model routing in Public Preview for AI applications that need to direct traffic among models without hardcoded endpoints or open-source proxies. The serverless ingress layer accepts OpenAI-compatible requests and uses routing rules in an OpenAPI 3.x specification, where x-google-api-management defines backends and routers map virtual model names to targets such as Gemini, Claude, or OpenAI OSS-GPT. After deployment, clients call a stable endpoint; the Gateway transcodes the request to the backend’s native schema, adds an Agent Platform authentication token, and forwards it, separating client authentication from provider credentials. The guide also notes that every backend in one router must share a host, and shows standalone routing alongside possible Agent Gateway integration for security governance.

## Context

AI applications need to route traffic to suitable models without hardcoding endpoints or managing open-source proxies. The configuration also separates application authentication from backend LLM authentication and supports centralized model changes.

## Approach / What changed

Configure model backends and routing rules in an OpenAPI 3.x specification using the x-google-api-management extension, deploy the API Gateway, and send standard OpenAI-compatible requests. The Gateway selects the backend, transcodes the payload, adds the required Agent Platform authentication token, and forwards the request.

## Takeaways

- Model routers map virtual model names to Gemini, Claude, or OpenAI OSS-GPT targets through OpenAPI configuration, with separate example routers for Gemini-Claude and OpenAI-Gemini.
- All backends referenced by a single router must share the same host; routing changes the model and path on that host rather than routing across different hosts.
- Applications use one stable Gateway endpoint and authenticate with an API key, while the Gateway handles native backend schemas and Agent Platform authentication.

**Tags:** [AI Gateway](https://yomu.fyi/topic/ai-gateway), [API](https://yomu.fyi/topic/api), [Model Routing](https://yomu.fyi/topic/model-routing), [OpenAPI](https://yomu.fyi/topic/openapi)

- Source: [Google](https://developers.googleblog.com/a-unified-api-for-ai-model-routing)
- Source URL: https://developers.googleblog.com/a-unified-api-for-ai-model-routing
- Ingested by Yomu: 2026-09-09T14:27:53.011Z

[Read original post](https://developers.googleblog.com/a-unified-api-for-ai-model-routing)
