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

# Ollama

> Integrate Ollama-hosted models with Prisma AIRS AI Gateway for local LLM deployment with full observability.

The AI Gateway provides a robust gateway to facilitate the integration of your **locally hosted models through Ollama**.

## Integration Steps

**1. Expose your Ollama API**

Expose your Ollama API using a tunneling service like [ngrok](https://ngrok.com/) or make it publicly accessible. Skip this if you run a [hybrid deployment](https://docs.portkey.ai/docs/aigw/self-hosting/private-network-access.md) that can reach Ollama on your network.

For using Ollama with ngrok, here's a [useful guide](https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-use-ollama-with-ngrok):

```sh theme={"system"}
ngrok http 11434 --host-header="localhost:11434"
```

**2. Add to Model Catalog**

1. Go to [**Model Catalog → Add Provider**](https://stratacloudmanager.paloaltonetworks.com/)
2. Enable **"Local/Privately hosted provider"** toggle
3. Select **Ollama** as the provider type
4. Enter your Ollama URL in **Custom Host**: `https://your-ollama.ngrok-free.app`
5. Name your provider (e.g., `my-ollama`)

> **[Complete Setup Guide](https://docs.portkey.ai/docs/aigw/product/model-catalog.md)**
>
> See all setup options

**3. Use in Your Application**

**Or use custom host directly:**

> [!NOTE]
>
> **Important:** For Ollama integration, you only need to pass the base URL to `customHost` **without** the version identifier (such as `/v1`) - the AI Gateway handles the rest!

***

## Supported Models

Ollama supports a wide range of models including:

* Llama 3, Llama 3.1, Llama 3.2
* Mistral, Mixtral
* Gemma, Gemma 2
* Phi-3
* Qwen 2
* And many more!

Check [Ollama's model library](https://ollama.com/library) for the complete list.

***

## Next Steps

> **[Gateway Configs](https://docs.portkey.ai/docs/aigw/product/ai-gateway.md)**
>
> Add retries, timeouts, and fallbacks

> **[Observability](https://docs.portkey.ai/docs/aigw/product/observability.md)**
>
> Monitor your Ollama requests

> **[Custom Host Guide](https://docs.portkey.ai/docs/aigw/product/ai-gateway/universal-api.md#integrating-local-or-private-models)**
>
> Learn more about custom host setup

> **[BYOLLM Guide](https://docs.portkey.ai/docs/aigw/integrations/llms/byollm.md)**
>
> Complete guide for private LLMs


## Related topics

- [Universal API](https://docs.portkey.ai/docs/aigw/product/ai-gateway/universal-api.md)
- [Custom hosts](https://docs.portkey.ai/docs/aigw/product/ai-gateway/custom-hosts.md)
- [Anthropic Computer Use](https://docs.portkey.ai/docs/aigw/integrations/libraries/anthropic-computer-use.md)
- [Enterprise Gateway](https://docs.portkey.ai/docs/changelog/enterprise.md)
- [Overview](https://docs.portkey.ai/docs/aigw/integrations/llms.md)


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