AI Infrastructure
Google API Gateway now streams real-time responses for AI apps and modern APIs
Streaming support arrives in public preview, letting developers add server-sent events, WebSockets, and long-lived connections to gateways without rewriting their API specifications.
Google Developers Blog (AI)
Google has brought streaming capabilities to its API Gateway service, allowing developers to handle real-time data flows and AI-generated responses without splitting their architecture between governed and ungoverned endpoints.
What's new#
API Gateway now supports multiple streaming patterns essential for modern applications:
- Server-Sent Events (SSE) — the standard for streaming model output to browsers and client SDKs
- Chunked transfer encoding and HTTP response streaming — including newline-delimited JSON (NDJSON) for progressively-delivered responses
- WebSockets — full-duplex connections for chat, collaboration, dashboards, and interactive sessions
- gRPC streaming — server-side and bidirectional streaming for previously non-proxiable services
Connections can remain open for up to one hour, and all existing API Gateway features continue to work: API key enforcement, JWT validation across multiple identity providers, Cloud Logging, Cloud Monitoring, and request routing.
How it works without changing your API#
The breakthrough, according to the announcement, is that streaming requires no API spec changes. Developers activate streaming via a single command-line flag when creating a gateway, with no new annotations, resource types, or extensions needed. The same OpenAPI document that describes an existing API automatically describes its streaming behavior.
Also launching alongside streaming is a deterministic hostname format that developers can compute before creating the gateway itself: GATEWAY_ID-PROJECT_NUMBER.REGION.gateway.dev. Previously, gateways received randomly-hashed hostnames, forcing teams to wait for resource creation before integrating the URL into configs, CI pipelines, or partner documentation.
Why it matters for AI applications#
For AI workloads, streaming removes a common friction point: users expect to see model outputs appear token-by-token rather than waiting for batch completion. Agents reporting progress, tool-calling protocols, and remote Model Context Protocol (MCP) servers all depend on incrementally-delivered responses.
By placing AI endpoints behind a managed gateway, teams gain centralized control over authentication, rate limiting, quota enforcement, and observability — capabilities that prevent each team from standing up separate proxies in front of model endpoints. The feature integrates with , which lets a single OpenAI-compatible endpoint dispatch requests to Gemini, Claude, or OpenAI models based on request payloads.

