> ## Content Index
> Fetch the complete content index at: https://locallabs-llm.org/llms.txt
> Use this file to discover other available public pages before exploring further.

# Ollama base URL: localhost, /api and /v1
- URL: https://locallabs-llm.org/ollama-base-url/
- Published: 2026-11-18T11:08:05.000Z
- Updated: 2026-11-25T10:38:13.000Z
- Description: Use the correct local Ollama address for your provider, check the model endpoint and avoid confusing a container with its host.
- Author: Albert Curry
- Tags: Ollama server and local API

For a local [Ollama](https://ollama.com/?ref=locallabs-llm.org) connection, the server address is `http://localhost:11434`. An app using Ollama's native API may ask for the base ending in `/api`; an OpenAI-compatible client normally uses `http://localhost:11434/v1`. Match the address to the app's provider setting.

## Choose the address your client expects

The [official API introduction lists separate local base URLs](https://docs.ollama.com/api/introduction?ref=locallabs-llm.org#base-urls):

__Local Ollama addresses__
| Field or client        | Address                    |
| ---------------------- | -------------------------- |
| Ollama server host     | http://localhost:11434     |
| Native API base        | http://localhost:11434/api |
| OpenAI-compatible base | http://localhost:11434/v1  |

Read the app's field description before appending a path. If it adds `/api/chat` itself, giving it a base that already ends with `/api` may produce a doubled path.

## Check the server independently of the app

In PowerShell, request the [local model inventory endpoint](https://docs.ollama.com/api/tags?ref=locallabs-llm.org):

```
Invoke-RestMethod -Uri 'http://localhost:11434/api/tags'
```

For macOS or Linux:

![GNOME Console with curl http://localhost:11434/api/tags entered at the shell prompt.](https://storage.ghost.io/c/e0/70/e070c514-431e-4a20-aa04-a641625f58e7/content/images/2026/11/ollama-base-url-ui-v3.webp)

Linux terminal: Check the native API using the model inventory endpoint. [View larger](https://storage.ghost.io/c/e0/70/e070c514-431e-4a20-aa04-a641625f58e7/content/images/2026/11/ollama-base-url-ui-v3.webp?ref=locallabs-llm.org)

```
curl http://localhost:11434/api/tags
```

A returned model inventory establishes a connection to that endpoint. It doesn't prove that an app has the correct provider or model name configured. Use a complete name from [your installed-model list](https://locallabs-llm.org/ollama-list-models/).

## Keep track of which computer makes the request

`localhost` means the machine or environment making the request. Inside a container, it refers to that container; on another computer, it refers to that other computer. Changing the URL alone does not establish a route between them.

Ollama [binds to the loopback address by default](https://docs.ollama.com/faq?ref=locallabs-llm.org#how-can-i-expose-ollama-on-my-network), and its [local API does not require authentication](https://docs.ollama.com/api/authentication?ref=locallabs-llm.org). I'd keep that default for an app on the same computer. Don't expose the unauthenticated service to the internet to fix a local connection.

If the app reports an unsupported feature after connecting, [compare the client and server versions](https://locallabs-llm.org/ollama-check-version/) before changing the address again.