GoogleMak Ahmad, Geir Sjurseth, Jeremy WhitlockAnnouncement
Streaming comes to API Gateway: real-time and AI-ready APIs, without changing your spec
Summary
For most of the last decade, API calls were transactions, but streaming has become essential for AI model responses, agent progress updates, and live dashboards, forcing a split between governed and ungoverned endpoints. Until now, developers had to make an uncomfortable choice: put streaming endpoints through the gateway and give up streaming, or route them around the gateway and give up governance. This announcement adds native streaming support for SSE, WebSockets, gRPC streaming, and chunked encoding, with no changes to your API specification and streams open for up to one hour. During Public Preview, streaming is enabled by a single flag at gateway creation; existing gateways must be recreated to enable streaming. A deterministic hostname that can be predicted before the gateway exists, along with model routing integration for streaming responses from Gemini, Claude, and OpenAI models, unifies governance for all traffic types.
Context
For years, API Gateway supported only transactional request-response patterns. Streaming endpoints for AI model responses, agent progress, and live dashboards could not be governed through the gateway, forcing developers to either lose streaming or route traffic around the gateway and lose authentication, API key enforcement, and observability.
Approach / What changed
API Gateway now supports native streaming for SSE, WebSocket, gRPC (server-side and bidirectional), and chunked transfer encoding without requiring API spec changes. During Public Preview, streaming is opted in via an –enable-streaming flag at gateway creation; existing gateways must be recreated. A deterministic hostname derived from gateway ID, project number, and region enables URL prediction before creation. The feature integrates with model routing to stream responses from Gemini, Claude, and OpenAI models.
Takeaways
Streaming support in API Gateway requires no changes to your API specification; the same document describes both transactional and streaming operations.
During Public Preview, streaming must be opted in at gateway creation using the –enable-streaming flag; existing gateways cannot be converted in place to add streaming.
Deterministic hostnames derived from gateway ID, project number, and region allow endpoint URL prediction and templating before creation, removing a bootstrapping problem for infrastructure-as-code workflows.
FAQ
Do I need to change my API spec to enable streaming?
No. Streaming does not require any spec changes, new extensions, or streaming-specific annotations. Your existing API document works as-is.
How do I enable streaming on an existing API Gateway?
During Public Preview, streaming can only be enabled on newly created gateways using the --enable-streaming flag. Existing gateways cannot be converted in place.
What streaming patterns does API Gateway support?
API Gateway supports SSE, WebSocket, gRPC streaming (server-side and bidirectional), and chunked transfer encoding including NDJSON. Streams can stay open for up to one hour.
Source and freshness
- Source
- developers.googleblog.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.