Posted on Sep 4, 2026 · Updated Sep 4, 2026 · 12 min read
API Gateway Pricing Explained: REST vs HTTP vs WebSocket (2026)
AWS API Gateway offers three separate API types with three separate pricing structures, and picking REST when HTTP would do costs 3.5x more per request for identical traffic. REST APIs bill on a declining tiered scale starting at $3.50 per million requests; HTTP APIs bill a flat $1.00 per million for most workloads; WebSocket APIs bill per message plus per connection-minute, a fundamentally different cost shape (AWS API Gateway pricing, 2026).
This guide covers every API Gateway cost line item — REST API tiered pricing, HTTP API's flatter rate, WebSocket messages and connection minutes, caching, data transfer, PrivateLink for private APIs, and the newer API Gateway Portals — with worked examples showing exactly where each API type wins. For how API Gateway fits into a broader serverless bill, see our serverless cost guide (Lambda plus API Gateway plus CloudWatch Logs), and for reducing what a private API pays in NAT/VPC traffic, see our NAT Gateway pricing guide.
TL;DR — API Gateway pricing (2026)
- REST APIs: $3.50/million requests for the first 333M/month, $2.80/million for the next 667M, $2.38/million beyond 1B — the only type with caching, request validation, and usage plans
- HTTP APIs: $1.00/million requests for the first 300M/month, $0.90/million beyond that — up to 71% cheaper than REST for the same traffic, but no caching and a smaller feature set
- WebSocket APIs: $1.00/million messages sent/received, plus $0.25/million connection-minutes — a persistent-connection cost model, not a per-request one
- Worked example below: 50M requests/month costs ~$175/month on REST vs ~$50/month on HTTP — identical traffic, 3.5x price gap, for an API that doesn't need REST-only features
- Data transfer out is $0.09/GB for all three types (public APIs); private APIs via PrivateLink pay $0.01/AZ-hour + $0.01/GB instead, with zero data-transfer-out charge
- Caching (REST APIs only) bills hourly by provisioned size regardless of traffic — a 1.6 GB cache runs ~$0.038/hr (~$27.70/month) whether it's hit once or a million times
- Free tier: 1 million REST calls, 1 million HTTP calls, and 1 million WebSocket messages + 750,000 connection-minutes per month, free for 12 months on new accounts
Table of contents
Three API types, three pricing models
API Gateway isn't one product with one price — it's three distinct API types, each with its own pricing structure and feature set, chosen when you create the API (and not easily changed afterward without rebuilding it):
- REST APIs — the original, full-featured type: request validation, API keys and usage plans, response caching, private integrations, and the richest set of authorization options. Priced highest, on a declining tiered scale.
- HTTP APIs — a newer, lighter-weight type built for simple proxy integrations (commonly Lambda or a container behind an ALB). Missing caching, usage plans, and some request-transformation features, but priced up to 71% lower than REST for equivalent traffic.
- WebSocket APIs — for persistent, bidirectional connections (chat, live dashboards, real-time notifications). Billed per message and per connection-minute rather than per request, since the underlying cost driver is a held-open connection, not a discrete call.
The practical rule: if your workload is a straightforward proxy to Lambda or an HTTP backend and doesn't need REST-only features (built-in caching, usage plans, API keys, request/response transformation), HTTP APIs are almost always the right default — the worked examples below quantify exactly how much that choice saves.
REST API pricing: the tiered scale
REST APIs bill per million requests received, on a declining tiered scale that only matters once you're well past most teams' actual volume (AWS API Gateway pricing, 2026, US East/US West/EU Ireland):
| Monthly volume tier | Price per million requests |
|---|---|
| First 333 million | $3.50 |
| Next 667 million (up to 1 billion) | $2.80 |
| Beyond 1 billion | $2.38 |
Source: AWS API Gateway pricing, 2026. Tiers apply per account per Region per month; the discount only bites meaningfully above roughly 333M requests/month, a volume most teams never reach on a single API.
On top of request volume, REST APIs bill $0.09/GB for data transferred out to the internet (waived for private APIs behind PrivateLink), plus optional per-hour caching charges covered below. REST is also the only type with a built-in response-streaming option, billed in 10 MB increments, for APIs that need to stream large payloads back to clients rather than buffer the full response.
HTTP API pricing: the cheaper default
HTTP APIs were introduced specifically to undercut REST pricing for the majority of workloads that don't need REST's full feature set — simple proxy integrations to Lambda, an ALB, or an HTTP backend:
| Monthly volume tier | Price per million requests |
|---|---|
| First 300 million | $1.00 |
| Beyond 300 million | $0.90 |
Source: AWS API Gateway pricing, 2026. Same $0.09/GB data transfer as REST applies; no per-hour caching charge exists because HTTP APIs don't offer built-in response caching at all.
The trade-off is feature depth, not reliability or performance — HTTP APIs run on the same underlying infrastructure and are generally faster (lower baseline latency) than REST APIs. What HTTP APIs give up: built-in response caching, usage plans and API keys for metering/throttling individual consumers, request validation against a model schema, and AWS WAF integration (WAF support on HTTP APIs shipped later and has narrower coverage than on REST). If none of those apply to your API, HTTP is the lower-cost, lower-latency choice with no real downside.
WebSocket API pricing: messages and connections
WebSocket APIs price a genuinely different cost shape — not a per-request charge, but a per-message-plus-per-connection-time charge, because the resource being consumed is a held-open connection rather than a discrete call:
- Messages: $1.00 per million messages sent or received, metered in 32 KB increments — a message larger than 32 KB counts as multiple billed messages
- Connection minutes: $0.25 per million connection-minutes — billed for every minute a client stays connected, regardless of whether any messages are exchanged during that minute
The connection-minute charge is the one teams most often underestimate: a chat or live-dashboard app with thousands of clients holding idle connections open for hours accumulates connection-minute charges even during periods with zero message traffic. Aggressive idle-timeout and reconnect-on-demand patterns cut this line item directly; a naive “never disconnect” client design does not.
Caching: the REST-only line item
Only REST APIs offer built-in response caching — HTTP and WebSocket APIs have no equivalent, so caching for those types has to be built externally (CloudFront in front of the API, or an application-level cache). REST API caching bills by the hour based on provisioned cache size, not by traffic or hit rate — a cache runs the same cost whether it's hit constantly or barely used (AWS API Gateway caching docs, 2026). Available sizes range from 0.5 GB up to 237 GB; as one AWS-published example, a 1.6 GB cache runs $0.038/hour (~$27.70/month), continuously, in US East, US West, or EU Ireland — regardless of cache hit rate. Larger sizes scale up from there; use the AWS Pricing Calculator for the exact rate at a specific size in your Region.
Caching is not eligible for the AWS Free Tier and is charged from the moment it's provisioned, even before any GET request is served — sizing a cache for an API still in development, or leaving one provisioned on a low-traffic staging stage, is a quiet recurring cost that's easy to forget once it's turned on.
Data transfer and PrivateLink
Data transferred out of API Gateway to the internet costs $0.09/GB across all three API types — the same rate as standard AWS internet egress, and on top of the per-request/per-message charges above. This is frequently the line item that surprises teams with large response payloads (image URLs, bulk JSON exports) more than the per-request fee itself.
Private APIs, accessed only from inside a VPC via an interface VPC endpoint (AWS PrivateLink), pay no data-transfer-out charge at all — instead they incur standard PrivateLink pricing: $0.01 per AZ-hour for the endpoint, plus $0.01/GB of data processed through it. For internal-only, high-traffic APIs (service-to-service calls within a VPC), this is usually meaningfully cheaper than the public $0.09/GB egress rate once volume is non-trivial, on top of the security benefit of never exposing the API publicly.
API Gateway Portals
API Gateway Portals — a self-service developer-portal product for publishing API documentation and letting external developers generate API keys — bill separately from the underlying API traffic: $125/month per portal, which includes up to 10 PortalProducts (published API groupings) with up to 40 ProductRestEndpoints each. Additional PortalProducts beyond the included 10 cost $12.50/month each. This is a flat monthly charge independent of how much traffic the underlying APIs receive — relevant mainly for teams exposing APIs to external/partner developers rather than internal-only consumption.
Worked examples: which type wins
50 million requests/month, no caching needed, simple Lambda proxy: REST API: 50M × $3.50/million = $175/month (plus data transfer). HTTP API: 50M × $1.00/million = $50/month (plus identical data transfer). For a workload that doesn't need REST-only features, HTTP API is 3.5x cheaper for identical traffic — a $125/month difference that compounds every month with no functional trade-off for a simple proxy API.
400 million requests/month, REST API with a 1.6 GB cache running 24/7: Request cost crosses into the second tier: 333M × $3.50/million = $1,165.50, plus 67M × $2.80/million = $187.60, for $1,353.10 in request charges, plus the cache at $0.038/hr × 730 hrs = $27.74/month, for ~$1,380.84/month total before data transfer. The equivalent traffic on HTTP API (no caching option) would cost 300M × $1.00/million + 100M × $0.90/million = $390/month — but only if an equivalent cache layer (e.g., CloudFront in front of HTTP API) can be built for meaningfully less than the ~$990/month gap, which is realistic for many read-heavy APIs and worth pricing out before defaulting to REST purely for its built-in cache.
Live chat app, 5,000 concurrent connections averaging 6 hours/day open, 20 messages/connection/day: Connection-minutes: 5,000 connections × 360 min/day × 30 days = 54M connection-minutes × $0.25/million = $13.50/month. Messages: 5,000 × 20 × 30 = 3M messages × $1.00/million = $3.00/month. Total: ~$16.50/month — illustrating that for WebSocket APIs, connection-minutes (not message count) usually dominates the bill once connections stay open for hours rather than seconds.
Common API Gateway cost mistakes
- Defaulting to REST API out of habit. The worked example above shows a 3.5x price gap versus HTTP API for identical traffic on a simple proxy workload — REST's extra cost only pays for itself if you actually use its extra features (caching, usage plans, request validation, WAF).
- Leaving a REST API cache provisioned on a low-traffic or staging stage. Caching bills by the hour from the moment it's enabled, regardless of hit rate — a forgotten cache on a rarely-used stage is a quiet, fully avoidable recurring charge.
- Building a chat/real-time feature on REST API with client-side polling instead of WebSocket API. Frequent polling multiplies request-count billing; a WebSocket connection amortizes that into connection-minutes, which is usually far cheaper for genuinely interactive workloads.
- Never disconnecting idle WebSocket clients. Connection-minutes accrue every minute a connection stays open, message traffic or not — idle-timeout and reconnect-on-demand patterns directly cut this line item.
- Serving a public API when only internal VPC traffic uses it. A private API behind PrivateLink swaps $0.09/GB egress for $0.01/AZ-hour + $0.01/GB — usually cheaper at real internal traffic volumes, with the added benefit of never exposing the API publicly.
Frequently asked questions
Is HTTP API or REST API cheaper on AWS?
HTTP API is cheaper for equivalent traffic: $1.00 per million requests (first 300M/ month) versus REST API's $3.50 per million (first 333M/month) — roughly a 3.5x difference. REST API only justifies its higher price if you actually need its extra features: built-in caching, usage plans/API keys, request validation, or broader WAF integration.
How much does API Gateway caching cost?
Caching (REST APIs only) bills hourly by provisioned cache size, regardless of traffic or hit rate. A 1.6 GB cache runs about $0.038/hour, roughly $27.70/month, if left running continuously. Sizes range from 0.5 GB up to 237 GB, with the hourly rate scaling up with size — check the AWS Pricing Calculator for the exact rate at a given size and Region.
How is WebSocket API pricing different from REST or HTTP?
WebSocket APIs bill per message ($1.00/million, metered in 32 KB increments) plus per connection-minute ($0.25/million minutes), rather than per discrete request. For workloads with long-lived connections, connection-minutes usually dominate the bill more than message volume does.
Does API Gateway have a free tier?
Yes, for new AWS accounts: 1 million REST API calls, 1 million HTTP API calls, and 1 million WebSocket messages plus 750,000 connection-minutes per month, free for 12 months. Caching is not covered by the free tier under any API type.
Is a private API Gateway cheaper than a public one?
For internal-only traffic, often yes at real volume: private APIs (accessed via PrivateLink from inside a VPC) pay $0.01/AZ-hour plus $0.01/GB processed, with zero data-transfer-out charge, instead of the public $0.09/GB egress rate that applies to both REST and HTTP APIs.
Estimate your cloud costs — for free
Compare AWS, Azure, and GCP pricing side by side with our free calculator, and dig into the guides to learn how to cut cloud waste. No sign-up required.