{"slug": "streaming-comes-to-api-gateway-real-time-and-ai-ready-apis-without-changing-your", "title": "Streaming comes to API Gateway: real-time and AI-ready APIs, without changing your spec", "summary": "Google Cloud made streaming support in API Gateway available in Public Preview, letting streaming endpoints sit behind the same gateway and policies as other APIs without changing the API spec. During preview, developers opt in with a single --enable-streaming flag when creating a gateway, and streams can stay open for up to one hour; at general availability, streaming is planned to be the default behavior with no opt-in. The release also gives gateways a deterministic default hostname in the form GATEWAY_ID-PROJECT_NUMBER.REGION.gateway.dev, replacing the previous hash-based hostname so teams can template and commit URLs before a gateway exists.", "body_md": "For most of the last decade, an API call looked like a transaction. A client sent a request, waited, and got a complete response back in one piece. That model is exactly what most API management tooling — including API Gateway — was built to handle, and it still describes a huge amount of production traffic.\n\nBut that no longer describes all traffic types. A model generating a response emits tokens as it produces them, not in one batch at the end. An agent working through a multi-step task reports progress as it goes. A dashboard, a collaborative editor, a live inference endpoint — these all need a connection that stays open and carries data in both directions.\n\nUntil now, developers building those experiences in API Gateway had to make an uncomfortable choice: put API Gateway in front of their APIs and give up streaming, or route streaming endpoints around the gateway and give up the authentication, API key enforcement, and observability that made the gateway essential in the first place. Teams ended up with a split estate — governed APIs on one path, ungoverned streaming traffic on another.\n\n**We're announcing that streaming support in API Gateway is available in Public Preview.** Your streaming endpoints can now sit behind the same gateway, with the same policies, as everything else you serve.\n\nFor AI applications, streaming also strengthens API Gateway's connection to Gemini platform. A gateway that uses model routing now streams responses from Gemini, Claude and OpenAI gpt-oss models in model garden in Gemini platform as they're generated, and streaming backends you host anywhere else work the same way. Alongside Apigee and Agent Gateway in Gemini platform, API Gateway is the lightweight entry point to Google Cloud's AI gateway capabilities.\n\nAPI Gateway now supports the full range of streaming patterns modern APIs rely on:\n\nStreams can stay open for up to one hour. As with any long-lived connection, clients should implement reconnection logic so that a session survives the end of a stream — a well-behaved WebSocket or SSE client should be doing this anyway.\n\nThis is the part we are most pleased with: **there is nothing new to learn.**\n\nStreaming is not a different product, a different resource type, or a different way of describing your API. There are no new extensions to add, no streaming-specific annotations, no separate spec for streaming operations. The same document that describes your existing API describes your streaming API.\n\nEverything you already rely on continues to work exactly as before:\n\nDuring Public Preview, you opt-in when creating the gateway:\n\n```\ngcloud api-gateway gateways create GATEWAY_ID \\\n  --api=API_ID \\\n  --api-config=CONFIG_ID \\\n  --location=REGION \\\n  --enable-streaming\n```\n\nThat single flag is the entire difference. At GA, it is planned that streaming will simply be how API Gateway behaves, with no opt-in required and, as during Preview, no changes to your API config.\n\nAlongside streaming, gateways get a deterministic default hostname:\n\n```\nGATEWAY_ID-PROJECT_NUMBER.REGION.gateway.dev\n\n(Example: streaming-test-12345.us-central1.gateway.dev)\n```\n\nPreviously the default `gateway.dev` hostname included a generated hash, which meant you could not know your gateway's URL until after you had created it. That is a small thing that causes a lot of friction: you can't write the endpoint into a client config, a Terraform module, a CI pipeline, a firewall allowlist, or a partner integration doc until the resource exists — and if you tear the environment down and rebuild it, the URL changes underneath you.\n\nNow the hostname is a pure function of values you already chose. You can generate it, template it, document it, and commit it to source control before the gateway exists, and you get the same URL every time you rebuild the same gateway in the same project and region. For anyone managing environments as code, or promoting a configuration from dev to staging to prod, this removes an entire category of bootstrapping problem.\n\nStreaming isn't a niche feature for AI applications — it's the expected interaction pattern.\n\nUsers expect to see a model's response appear as it's generated, not after a thirty-second pause. Agents need to report intermediate steps. Tool-calling protocols and remote MCP servers depend on long-lived, incrementally-delivered connections. An API management layer that can't stream severely limits the user experience of AI applications.\n\nWith streaming, API Gateway becomes a viable front door for that agentic traffic — and the value of a front door is exactly the same as it's always been, only more urgent. AI endpoints are expensive, they consume quota, they need per-consumer authentication and rate limiting, and they need to be observable. These are the governance problems that an AI gateway is intended to solve. The alternative — every team standing up its own proxy in front of its own model endpoint — is how organizations end up unable to answer basic questions about who is calling what.\n\n[Model routing](https://cloud.google.com/api-gateway/docs/model-routing-overview) in API Gateway lets you expose a single OpenAI-compatible endpoint and dispatch requests to Gemini, Claude, or OpenAI gpt-oss models based on the model field in the request payload. Model routing plus streaming means clients get a familiar, standards-based streaming interface, while you retain centralized control over which models are reachable, by whom, and under what policy.\n\nStreaming, model routing and [MCP support](https://developers.googleblog.com/turn-your-rest-apis-into-mcp-tools-with-google-cloud-api-gateway/) are all features within API Gateway that provide a lightweight on-ramp to AI gateway capabilities within Google Cloud. These AI gateway capabilities allow teams to monitor, secure and control agentic traffic of tools, models and agents in their ecosystem, and they're delivered as a composable suite so you can choose the right gateway for each use case. For more expansive AI policies and full lifecycle management, use [Apigee](https://docs.cloud.google.com/apigee/docs/api-platform/get-started/ai-capabilities). To manage and secure agent connectivity, use [Agent Gateway](https://docs.cloud.google.com/gemini-enterprise-agent-platform/govern/gateways/agent-gateway-overview) in Gemini platform. You can also combine these gateways: API Gateway or Apigee can sit in front of your agents and APIs, or behind Agent Gateway so your agents can reach models, tools, and MCP servers. 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 model routing.\n\nA few things to plan around while the feature is in Preview:\n\nIf you're already using API Gateway, the fastest way to see this working is to point a new streaming-enabled gateway at an existing backend that emits SSE and watch the events arrive incrementally. No spec changes needed.", "url": "https://wpnews.pro/news/streaming-comes-to-api-gateway-real-time-and-ai-ready-apis-without-changing-your", "canonical_source": "https://developers.googleblog.com/streaming-comes-to-api-gateway-real-time-and-ai-ready-apis-without-changing-your-spec/", "published_at": "2026-10-22 15:13:17.709188+00:00", "updated_at": "2026-10-22 15:13:19.821691+00:00", "lang": "en", "topics": ["ai-infrastructure", "ai-agents", "large-language-models", "developer-tools"], "entities": ["Google Cloud", "API Gateway", "Gemini", "Claude", "OpenAI gpt-oss", "Apigee", "Agent Gateway"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/streaming-comes-to-api-gateway-real-time-and-ai-ready-apis-without-changing-your", "markdown": "https://wpnews.pro/news/streaming-comes-to-api-gateway-real-time-and-ai-ready-apis-without-changing-your.md", "text": "https://wpnews.pro/news/streaming-comes-to-api-gateway-real-time-and-ai-ready-apis-without-changing-your.txt", "jsonld": "https://wpnews.pro/news/streaming-comes-to-api-gateway-real-time-and-ai-ready-apis-without-changing-your.jsonld"}}