> ## 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.

# Credits

> Understanding AI Gateway credits, pricing, and balance management.

AI Gateway credits are a prepaid balance you purchase through [app.ngrok.ai](https://app.ngrok.ai). Every request through `https://gateway.ngrok.ai` spends credits.

Each request pays a small [processing fee](#processing-fee). When you use ngrok.ai inference for built-in OpenAI and Anthropic, credits also cover the model cost. See [How credits are consumed](#how-credits-are-consumed) for the full breakdown.

AI Gateway credits are separate from your ngrok platform billing on [dashboard.ngrok.com](https://dashboard.ngrok.com).

## Accounts and plans

You don't need a specific ngrok subscription plan to use the AI Gateway or purchase credits. Sign in at [app.ngrok.ai](https://app.ngrok.ai), buy credits, and create an [access key](/ai-gateway/concepts/access-keys).

The AI Gateway and your broader ngrok account share the same ngrok account, but they are separate systems:

|             | [app.ngrok.ai](https://app.ngrok.ai)        | [dashboard.ngrok.com](https://dashboard.ngrok.com)             |
| ----------- | ------------------------------------------- | -------------------------------------------------------------- |
| **Purpose** | AI Gateway: keys, providers, credits, usage | ngrok platform: subscription, team members, tunnels, endpoints |
| **Credits** | AI Gateway credits (this page)              | Not used for AI Gateway traffic                                |

If you want ngrok platform features alongside the AI Gateway (such as team members, or [internal endpoints](/ai-gateway/concepts/custom-providers) to reach self-hosted models) you can manage those through [dashboard.ngrok.com](https://dashboard.ngrok.com). This generally requires a paid ngrok plan such as [Pay-as-you-go](https://ngrok.com/pricing); using the gateway with credits alone does not.

## Purchasing credits

Visit the [Credits page](https://app.ngrok.ai/credits) and purchase at least USD \$5.00.

You can also start checkout via the AI Gateway API:

```bash theme={null}
curl -X POST https://api.ngrok.ai/credits/checkout-session \
  -H "Authorization: Bearer $AI_GATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "amount": 500 }'
```

Credits expire **one year** after purchase.

## How credits are consumed

| Routing                                           | Credits pay for                        | You pay separately                   |
| ------------------------------------------------- | -------------------------------------- | ------------------------------------ |
| Built-in OpenAI or Anthropic (ngrok.ai inference) | Processing fee and upstream model cost | Nothing                              |
| Built-in provider with your provider key          | Processing fee                         | Upstream model cost to your provider |

## Balance tracking

You can view your balance on the [Credits page](https://app.ngrok.ai/credits), or via the API:

```bash theme={null}
curl https://api.ngrok.ai/credits/balance \
  -H "Authorization: Bearer $AI_GATEWAY_API_KEY"
```

## What happens when credits run out

When your credit balance reaches zero, the gateway rejects new requests until you purchase more credits.

## Processing fee

Every successful request through the gateway incurs a processing fee at **USD \$0.05 per million tokens**. The fee is based on the tokens in your request and response. It applies to all traffic—ngrok.ai inference, your own [provider keys](/ai-gateway/guides/attaching-provider-keys), and [custom providers](/ai-gateway/concepts/custom-providers)—and does not vary by model or provider.

When you use ngrok.ai inference for built-in OpenAI and Anthropic providers, credits also cover upstream model cost. When you bring your own key, upstream costs stay on your provider account and credits cover only the processing fee.

## Next steps

* [Access Keys](/ai-gateway/concepts/access-keys): Authenticate requests to the gateway
* [Quickstart](/ai-gateway/quickstart): Purchase credits and make your first request
* [Bring Your Own Keys](/ai-gateway/concepts/bring-your-own-keys): Use your own provider API keys
