> ## Documentation Index
> Fetch the complete documentation index at: https://ngrok.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Framework Libraries

> Put a Next.js, Gin, FastAPI, or Axum app online with one call using ngrok's framework libraries, built on the Agent SDKs.

Framework libraries wrap the [Agent SDKs](https://ngrok.com/docs/agent-sdks.md) in the idiom of a specific web framework.
Instead of opening a session, building a listener, and forwarding traffic yourself, you make one call in the place your framework already expects it, and your app gets a public URL.

| Framework | Package | Built on |
| - | - | - |
| [Next.js](https://ngrok.com/docs/agent-sdks/frameworks/nextjs.md) | [`@ngrok/nextjs`](https://www.npmjs.com/package/@ngrok/nextjs) on npm | [JavaScript SDK](https://ngrok.com/docs/getting-started/javascript.md) |
| [Gin](https://ngrok.com/docs/agent-sdks/frameworks/gin.md) | [`ngrok-gin`](https://pkg.go.dev/github.com/ngrok-samples/ngrok-gin) on pkg.go.dev | [Go SDK](https://ngrok.com/docs/getting-started/go.md) |
| [FastAPI](https://ngrok.com/docs/agent-sdks/frameworks/fastapi.md) | [`ngrok-fastapi`](https://pypi.org/project/ngrok-fastapi/) on PyPI | [Python SDK](https://ngrok.com/docs/getting-started/python.md) |
| [Axum](https://ngrok.com/docs/agent-sdks/frameworks/axum.md) | [`ngrok-axum`](https://crates.io/crates/ngrok-axum) on crates.io | [Rust SDK](https://ngrok.com/docs/getting-started/rust.md) |

Each page shows the install command and the one call that replaces your framework's usual server start.

## What they have in common

Every library reads your auth token from the `NGROK_AUTHTOKEN` environment variable and, when you don't set a URL, puts your app on your account's [dev domain](https://ngrok.com/docs/gateway/domains.md#dev-domains).

Every library takes the same four endpoint options, spelled in each language's own style:

| Option | What it does |
| - | - |
| URL | The [reserved domain](https://ngrok.com/docs/gateway/domains.md) for the endpoint. Omit it to use your dev domain. |
| Pooling | Opts in to [endpoint pooling](https://ngrok.com/docs/gateway/endpoints/endpoint-pooling.md) so more than one endpoint can share a URL. |
| Traffic Policy | A raw [Traffic Policy](https://ngrok.com/docs/gateway/traffic-policy.md) document (YAML or JSON) that the library passes through to ngrok unchanged. |
| Binding | The endpoint's [binding](https://ngrok.com/docs/gateway/endpoints/bindings.md): `public`, `internal`, or `kubernetes`. |

There are no per-feature options for authentication, IP restrictions, headers, or webhook verification.
Those features all live in Traffic Policy, so the libraries stay small and don't go stale as Traffic Policy grows.

Every library can also open more than one endpoint from a single process, and every library refuses to start if two endpoints would land on the same URL without pooling.
Without that check, ngrok lets the most recently opened listener win and the other goes unreachable with no error.

## Limits and availability

* The libraries are published at version 0.1.x and live in the [ngrok-samples](https://github.com/ngrok-samples) GitHub organization, separate from the core SDK repositories.
* An `internal` binding requires a URL that ends in `.internal`.
  ngrok rejects any other URL with [`ERR_NGROK_9029`](https://ngrok.com/docs/errors/err_ngrok_9029).
* Endpoint counts, domains, and bandwidth follow your plan's limits.
  See [free plan limits](https://ngrok.com/docs/pricing-limits/free-plan-limits.md) and the [pricing page](https://ngrok.com/pricing).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.