> For the complete documentation index, see [llms.txt](https://docs.serverlessapigateway.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.serverlessapigateway.com/getting-started/cost.md).

# Cost

The Serverless API Gateway is a powerful open-source solution designed to make your API management tasks straightforward and efficient. At its core, the gateway leverages the robust infrastructure of Cloudflare Workers, enabling you to deploy and run your APIs at the edge with unprecedented speed and scalability. While the API Gateway itself is completely free to use, the only costs to consider are those associated with Cloudflare Workers. These costs are typically minimal, especially for smaller applications, thanks to Cloudflare's generous free tier. As you scale your application, Cloudflare Workers offer competitive pricing options to ensure your costs remain manageable.

Serverless API Gateway does not charge a license fee, route fee, seat fee, or hosted control-plane fee. The project is open source; runtime cost comes from the Cloudflare services and upstream APIs you choose to use.

If you want the latest product-level pricing summary, read the main site's [Serverless API Gateway pricing page](https://serverlessapigateway.com/pricing). Use this GitBook page for docs-side cost context and Cloudflare Worker-specific calculations.

## What affects API gateway cost?

The main cost drivers are:

* Monthly request volume.
* Worker CPU time per request.
* Auth work such as JWT validation or Auth0/Supabase calls.
* Config storage, such as KV, when used.
* Upstream APIs, databases, auth providers, or service bindings called by the gateway.

## Quick Cost View

| Question                             | Short answer                                                              |
| ------------------------------------ | ------------------------------------------------------------------------- |
| Does this repo charge a license fee? | No.                                                                       |
| Do you pay per route?                | No.                                                                       |
| What are you billed for?             | Cloudflare runtime and any services you attach around the gateway.        |
| What raises the total bill?          | More traffic, more auth work, more storage, and more supporting services. |

### Cloudflare Workers Cost

You can find details of pricing [here](https://developers.cloudflare.com/workers/platform/pricing/#workers).

<figure><img src="/files/qroVtjN9iTFXtQsWEAgh" alt=""><figcaption></figcaption></figure>

### Calculations

Let's calculate the potential cost of a Serverless API Gateway, using real-life metrics from an existing user. Here are the metrics:

<figure><img src="/files/Wd9ybDi6nvjImlp59oZG" alt=""><figcaption></figcaption></figure>

Based the metrics it is safe to say Serverless API Gateway CPU time average is around 2ms. Here is estimated cost based on request per day.

<figure><img src="/files/A6yZfgqWO4DYRFydb16k" alt=""><figcaption></figcaption></figure>

You can find the calculation as a Google Sheet [here](https://docs.google.com/spreadsheets/d/1jkIFQmt4Q6XX7J4wmXIYokZIyT6JQui-rjh-yAFQIHo/edit?usp=sharing). Follow our [Serverless API Gateway Blog](https://blog.serverlessapigateway.com/) to check out comparisons with other API Gateway solutions.

### See Also

* [Getting Started](/getting-started/introduction.md) -- clone the repository and deploy your first gateway.
* [Deploy with Wrangler](/deployment/wrangler.md) -- deploy to Cloudflare Workers where these costs apply.
* [Configuration Guide](/configuration/overview.md) -- set up your API gateway configuration before deploying.
* [Authorizer](/configuration/authorizer.md) -- auth work can materially affect per-request cost.
* [Supabase OTP](/configuration/supabase-otp.md) -- passwordless auth flows can add service and runtime cost.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.serverlessapigateway.com/getting-started/cost.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
