AI
Google Cloud API Gateway adds dynamic AI model routing in public preview
Google's API Gateway now lets developers route requests across Gemini, Claude, and OpenAI models without hardcoding endpoints or managing proxies.
Google Developers Blog (AI)
Google Cloud has expanded its API Gateway platform with new model routing capabilities, now entering public preview. The feature addresses a common challenge for AI application builders: seamlessly directing traffic between different language models while maintaining consistent interfaces.
How the routing works#
The new functionality sits as a lightweight, serverless layer that accepts requests compatible with OpenAI's API format and intelligently directs them to various backends—including Google's Gemini models, Anthropic's Claude, or open-source alternatives. Developers can also integrate it with Google's Gemini Enterprise Agent Platform, routing agent outputs through Agent Gateway for enhanced security before passing requests onward to handle dynamic model selection.
Setting up routing logic#
Configuration relies on OpenAPI 3.x specifications enhanced with a new x-google-api-management extension block. Through this block, developers can define virtual model names mapped to specific backend targets, configure routing rules between models, and set response deadlines. The setup involves three main steps: defining routing rules within the OpenAPI spec, deploying the gateway configuration, and sending standard requests—the gateway then intercepts traffic, translates payloads to each backend's native format, and routes on the fly.
Technical constraints#
An important limitation: all backends referenced by a single router must reside on the same host (such as aiplatform.googleapis.com). Routing selects different models and paths within that shared host rather than crossing different hosts entirely.
Getting started#
The capability is available now in public preview, with documentation available to help developers deploy their first model router.

