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

# Use ngrok.ai inference

> Call supported providers without adding provider keys.

Use ngrok.ai inference when you want the AI Gateway to supply upstream provider credentials for you.

Your app sends an [access key](/ai-gateway/concepts/access-keys) to the gateway. The gateway authenticates to the supported upstream provider, and credits cover the model cost plus the gateway processing fee.

<Note>
  Today, ngrok.ai inference supports built-in OpenAI and Anthropic models. Other supported providers may be added over time. For providers that require your own credentials, [bring your own provider key](/ai-gateway/guides/attaching-provider-keys).
</Note>

## What you'll need

* An ngrok account.
* An [access key](/ai-gateway/concepts/access-keys) from [app.ngrok.ai](https://app.ngrok.ai).
* Credits in your AI Gateway account.

## Create an access key

Create an access key in [app.ngrok.ai](https://app.ngrok.ai). Use this key as the API key in your SDK.

The access key authenticates your application to the gateway. It is different from a provider key, which authenticates the gateway to an upstream provider.

## Call a supported OpenAI model

```json theme={null}
{
  "model": "openai:gpt-4o",
  "messages": [{"role": "user", "content": "Hello"}]
}
```

You can also use the model ID directly:

```json theme={null}
{
  "model": "gpt-4o",
  "messages": [{"role": "user", "content": "Hello"}]
}
```

## Call a supported Anthropic model

```json theme={null}
{
  "model": "anthropic:claude-sonnet-4-6",
  "messages": [{"role": "user", "content": "Hello"}]
}
```

## How billing works

For supported ngrok.ai inference requests, credits cover:

* The upstream model cost.
* The AI Gateway processing fee.

For other built-in providers, or when you want usage billed directly by OpenAI or Anthropic, [bring your own provider key](/ai-gateway/guides/attaching-provider-keys).

## When to bring your own key instead

Bring your own provider key when:

* You already have a provider account.
* You want usage billed directly by the provider.
* You have negotiated provider pricing.
* You need a provider or model that requires your own credentials.

## Next steps

* [Credits](/ai-gateway/concepts/credits): Learn how credits work
* [Choose a model](/ai-gateway/guides/model-selection-strategies): Choose model IDs and provider-qualified models
* [Bring your own provider key](/ai-gateway/guides/attaching-provider-keys): Use your own upstream provider credentials
