Skip to content

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

docs: refresh getting started guides (#18450)

Parth Sareen38fdb5dd58c7
diff --git a/docs/api/anthropic-compatibility.mdx b/docs/api/anthropic-compatibility.mdx
index 299b44808..676514817 100644
--- a/docs/api/anthropic-compatibility.mdx
+++ b/docs/api/anthropic-compatibility.mdx
@@ -2,9 +2,42 @@
title: Anthropic compatibility
---
-Ollama provides compatibility with the [Anthropic Messages API](https://docs.anthropic.com/en/api/messages) to help connect existing applications to Ollama, including tools like Claude Code.
+Connect Anthropic clients and tools such as Claude Code to Ollama. Ollama supports a subset of the [Anthropic Messages API](https://platform.claude.com/docs/en/api/http/messages/create).
-## Usage
+## Direct cloud access
+
+Set your [API key](https://ollama.com/settings/keys) in `OLLAMA_API_KEY`. No Ollama installation required.
+
+```shell
+export OLLAMA_API_KEY="your_api_key"
+```
+
+Send a request with bearer authentication:
+
+```shell
+curl https://ollama.com/v1/messages \
+ -H "Authorization: Bearer $OLLAMA_API_KEY" \
+ -H "Content-Type: application/json" \
+ -H "anthropic-version: 2023-06-01" \
+ -d '{
+ "model": "gemma4:31b",
+ "max_tokens": 1024,
+ "messages": [
+ {
+ "role": "user",
+ "content": "Say hello in one sentence."
+ }
+ ]
+ }'
+```
+
+Read text blocks from `content`. The cloud endpoint requires `Authorization: Bearer`; it does not accept `x-api-key` alone.
+
+Compatible models support messages, streaming, and function calling. Tool-choice controls, deferred tools, and hosted web search are not fully supported.
+
+## Local server usage
+
+These examples connect to your local Ollama server. Use `ollama` as the placeholder API key. To use cloud models through this server, [sign in to Ollama](/api/authentication#signing-in).
### Environment variables
@@ -234,55 +267,7 @@ curl -X POST http://localhost:11434/v1/messages \
## Using with Claude Code
-[Claude Code](https://code.claude.com/docs/en/overview) can be configured to use Ollama as its backend.
-
-### Recommended models
-
-For coding use cases, models like `glm-4.7`, `minimax-m2.1`, and `qwen3-coder` are recommended.
-
-Download a model before use:
-
-```shell
-ollama pull qwen3-coder
-```
-> Note: Qwen 3 coder is a 30B parameter model requiring at least 24GB of VRAM to run smoothly. More is required for longer context lengths.
-
-```shell
-ollama pull glm-4.7:cloud
-```
-
-### Quick setup
-
-```shell
-ollama launch claude
-```
-
-This will prompt you to select a model, configure Claude Code automatically, and launch it. To configure without launching:
-
-```shell
-ollama launch claude --config
-```
-
-### Manual setup
-
-Set the environment variables and run Claude Code:
-
-```shell
-ANTHROPIC_AUTH_TOKEN=ollama ANTHROPIC_BASE_URL=http://localhost:11434 claude --model qwen3-coder
-```
-
-Or set the environment variables in your shell profile:
-
-```shell
-export ANTHROPIC_AUTH_TOKEN=ollama
-export ANTHROPIC_BASE_URL=http://localhost:11434
-```
-
-Then run Claude Code with any Ollama model:
-
-```shell
-claude --model qwen3-coder
-```
+See the [Claude Code guide](/integrations/claude-code) for Ollama Launch and [direct cloud setup](/integrations/claude-code#connect-directly-to-ollama-cloud).
## Endpoints
@@ -360,12 +345,9 @@ Recommended local models:
### Cloud models
-Cloud models are available immediately without pulling:
-
-- `glm-4.7:cloud` - High-performance cloud model
-- `minimax-m2.1:cloud` - Fast cloud model
+Browse the [cloud model catalog](https://ollama.com/search?c=cloud). Through a signed-in Ollama server, use a cloud name such as `gemma4:cloud` without a separate pull. For direct cloud requests, use the hosted identifier, such as `gemma4:31b`.
-### Default model names
+### Default model names on a local server
For tooling that relies on default Anthropic model names such as `claude-3-5-sonnet`, use `ollama cp` to copy an existing model name:
@@ -394,8 +376,8 @@ curl http://localhost:11434/v1/messages \
### Behavior differences
-- API key is accepted but not validated
-- `anthropic-version` header is accepted but not used
+- The local server does not validate API keys. Direct cloud inference requires a valid bearer token.
+- The hosted endpoint rejects `anthropic-version` values older than `2023-06-01`. Use `2023-06-01` in requests.
- Token counts are approximations based on the underlying model's tokenizer
### Not supported
diff --git a/docs/api/authentication.mdx b/docs/api/authentication.mdx
index 03d802fb3..ad8417d4e 100644
--- a/docs/api/authentication.mdx
+++ b/docs/api/authentication.mdx
@@ -2,34 +2,52 @@
title: Authentication
---
-No authentication is required when accessing Ollama's API locally via `http://localhost:11434`.
+The local API at `http://localhost:11434` does not require authentication.
-Authentication is required for the following:
+To use cloud models, publish models, or download private models, sign in to Ollama. For direct API access to ollama.com, use an API key.
-* Running cloud models via ollama.com
-* Publishing models
-* Downloading private models
+## API keys
+
+Direct cloud inference at `https://ollama.com/api` and `https://ollama.com/v1` requires an API key. No Ollama installation or local server is required.
-Ollama supports two authentication methods:
+Create an [API key](https://ollama.com/settings/keys), then set it in your terminal:
+
+```shell
+export OLLAMA_API_KEY="your_api_key"
+```
-* **Signing in**: sign in from your local installation, and Ollama will automatically take care of authenticating requests to ollama.com when running commands
-* **API keys**: API keys for programmatic access to ollama.com's API
+Use the API key in the `Authorization: Bearer` header. This also applies to the hosted Anthropic-compatible `/v1/messages` endpoint; `x-api-key` alone is not supported.
+
+```shell
+curl https://ollama.com/api/chat \
+ -H "Authorization: Bearer $OLLAMA_API_KEY" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "model": "gemma4:31b",
+ "messages": [{"role": "user", "content": "Why is the sky blue?"}],
+ "stream": false
+ }'
+```
+
+API keys do not expire. Revoke a key in [API keys settings](https://ollama.com/settings/keys).
+
+Keep keys outside browser code and source control. See the [API quickstart](/quickstart#build-an-application) for shell setup and compatibility examples.
## Signing in
-To sign in to ollama.com from your local installation of Ollama, run:
+Sign in from your terminal:
```
ollama signin
```
-Once signed in, Ollama will automatically authenticate commands as required:
+Ollama then authenticates cloud requests for you:
```
ollama run gpt-oss:120b-cloud
```
-Similarly, when accessing a local API endpoint that requires cloud access, Ollama will automatically authenticate the request:
+This also works through the local API:
```shell
curl http://localhost:11434/api/generate -d '{
@@ -37,27 +55,3 @@ curl http://localhost:11434/api/generate -d '{
"prompt": "Why is the sky blue?"
}'
```
-
-## API keys
-
-For direct access to ollama.com's API served at `https://ollama.com/api`, authentication via API keys is required.
-
-First, create an [API key](https://ollama.com/settings/keys), then set the `OLLAMA_API_KEY` environment variable:
-
-```shell
-export OLLAMA_API_KEY=your_api_key
-```
-
-Then use the API key in the Authorization header:
-
-```shell
-curl https://ollama.com/api/generate \
- -H "Authorization: Bearer $OLLAMA_API_KEY" \
- -d '{
- "model": "gpt-oss:120b",
- "prompt": "Why is the sky blue?",
- "stream": false
- }'
-```
-
-API keys don't currently expire, however you can revoke them at any time in your [API keys settings](https://ollama.com/settings/keys).
diff --git a/docs/api/introduction.mdx b/docs/api/introduction.mdx
index c72da657c..0b42a6b30 100644
--- a/docs/api/introduction.mdx
+++ b/docs/api/introduction.mdx
@@ -2,45 +2,55 @@
title: Introduction
---
-Use Ollama's API to run and interact with models.
+Use Ollama's API to build applications with cloud or local models.
## Get started
-Follow the [quickstart](/quickstart) to install Ollama and make your first request.
+Call cloud models with an [API key](https://ollama.com/settings/keys). No Ollama installation required. Start with the [API quickstart](/quickstart#build-an-application).
-## Base URL
+To run models on your computer, [install Ollama and run a local model](/quickstart#run-a-model-locally).
-After installation, Ollama's API is served by default at:
+## Base URLs
-```
-http://localhost:11434/api
-```
+| API | Direct cloud access | Local Ollama server |
+| --- | --- | --- |
+| Ollama | `https://ollama.com/api` | `http://localhost:11434/api` |
+| OpenAI compatibility | `https://ollama.com/v1` | `http://localhost:11434/v1` |
+| Anthropic client base URL | `https://ollama.com` | `http://localhost:11434` |
-For running cloud models on [ollama.com](https://ollama.com), the same API is available with the following base URL:
+The Anthropic client appends `/v1/messages` to its base URL.
-```
-https://ollama.com/api
-```
+Cloud requests need an API key. Local requests do not. To use cloud models through your local server, [sign in to Ollama](/api/authentication#signing-in).
-## Example request
+Creating or deleting models requires a local Ollama server. For supported API features, see [OpenAI compatibility](/api/openai-compatibility) and [Anthropic compatibility](/api/anthropic-compatibility).
-Once Ollama is running, its API is automatically available and can be accessed via `curl`:
+## Ollama API example
+
+Set `OLLAMA_API_KEY` to your [API key](https://ollama.com/settings/keys), then call a cloud model:
```shell
-curl http://localhost:11434/api/generate -d '{
- "model": "gemma4",
- "prompt": "Why is the sky blue?"
-}'
+curl https://ollama.com/api/chat \
+ -H "Authorization: Bearer $OLLAMA_API_KEY" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "model": "gemma4:31b",
+ "messages": [{"role": "user", "content": "Why is the sky blue?"}],
+ "stream": false
+ }'
```
+Read the answer from `message.content`. For local inference, use `http://localhost:11434/api/chat` with a downloaded model and omit the authorization header.
+
## Libraries
-Ollama has official libraries for Python and JavaScript:
+Use Ollama's official libraries with either a local server or the hosted API:
- [Python](https://github.com/ollama/ollama-python)
- [JavaScript](https://github.com/ollama/ollama-js)
-Several community-maintained libraries are available for Ollama. For a full list, see the [Ollama GitHub repository](https://github.com/ollama/ollama?tab=readme-ov-file#libraries--sdks).
+For direct cloud access, set the host to `https://ollama.com` and supply your API key in the `Authorization: Bearer` header.
+
+Browse [community libraries](https://github.com/ollama/ollama?tab=readme-ov-file#libraries--sdks).
## Versioning
diff --git a/docs/api/openai-compatibility.mdx b/docs/api/openai-compatibility.mdx
index 4b34fa096..c12bda912 100644
--- a/docs/api/openai-compatibility.mdx
+++ b/docs/api/openai-compatibility.mdx
@@ -2,9 +2,43 @@
title: OpenAI compatibility
---
-Ollama provides compatibility with parts of the [OpenAI API](https://platform.openai.com/docs/api-reference) to help connect existing applications to Ollama.
+Connect OpenAI clients to Ollama. Ollama supports a subset of the [OpenAI API](https://platform.openai.com/docs/api-reference).
-## Usage
+## Direct cloud access
+
+Set your [API key](https://ollama.com/settings/keys) in `OLLAMA_API_KEY`. Install the client with `pip install openai`. No Ollama installation required.
+
+```python
+import os
+from openai import OpenAI
+
+client = OpenAI(
+ base_url="https://ollama.com/v1",
+ api_key=os.environ["OLLAMA_API_KEY"],
+)
+
+response = client.chat.completions.create(
+ model="gemma4:31b",
+ messages=[{"role": "user", "content": "Say hello in one sentence."}],
+)
+print(response.choices[0].message.content)
+```
+
+The same client supports stateless Responses requests:
+
+```python
+response = client.responses.create(
+ model="gemma4:31b",
+ input="Say hello in one sentence.",
+)
+print(response.output_text)
+```
+
+Choose a [cloud model](https://ollama.com/search?c=cloud). The cloud API does not support stateful Responses, built-in web search through `/v1/responses`, or custom/freeform tool-call replay.
+
+## Local server usage
+
+These examples connect to your local Ollama server. The client requires an API key value, but Ollama ignores it. To use cloud models through this server, [sign in to Ollama](/api/authentication#signing-in).
### Simple `/v1/chat/completions` example
@@ -279,7 +313,9 @@ curl -X POST http://localhost:11434/v1/chat/completions \
- [x] `dimensions`
- [ ] `user`
-### `/v1/responses`
+### Responses API
+
+`POST /v1/responses`
> Note: Added in Ollama v0.13.3
@@ -308,13 +344,15 @@ Ollama supports the [OpenAI Responses API](https://platform.openai.com/docs/api-
## Models
-Before using a model, pull it locally `ollama pull`:
+For local inference, download a model before using it:
```shell
ollama pull llama3.2
```
-### Default model names
+Direct cloud requests use the identifiers from `https://ollama.com/api/tags` and do not require a pull. Through a signed-in local server, select a cloud model such as `gemma4:cloud`.
+
+### Default model names on a local server
For tooling that relies on default OpenAI model names such as `gpt-3.5-turbo`, use `ollama cp` to copy an existing model name to a temporary name:
@@ -338,7 +376,7 @@ curl http://localhost:11434/v1/chat/completions \
}'
```
-### Setting the context size
+### Setting the local context size
The OpenAI API does not have a way of setting the context size for a model. If you need to change the context size, create a `Modelfile` which looks like:
diff --git a/docs/cloud.mdx b/docs/cloud.mdx
index 2bc46471f..48e8d6cab 100644
--- a/docs/cloud.mdx
+++ b/docs/cloud.mdx
@@ -3,290 +3,90 @@ title: Cloud
sidebarTitle: Cloud
---
-## Cloud Models
+Run models in Ollama's cloud from your apps or terminal. No model or app download required.
-Ollama's cloud models are a new kind of model in Ollama that can run without a powerful GPU. Instead, cloud models are automatically offloaded to Ollama's cloud service while offering the same capabilities as local models, making it possible to keep using your local tools while running larger models that wouldn't fit on a personal computer.
+## API Key
-### Supported models
+Create an [API key](https://ollama.com/settings/keys), then set it in Bash or Zsh:
-For a list of supported models, see Ollama's [model library](https://ollama.com/search?c=cloud).
-
-### Running Cloud models
-
-Ollama's cloud models require an account on [ollama.com](https://ollama.com). To sign in or create an account, run:
-
-```
-ollama signin
-```
-
-<Tabs>
- <Tab title="CLI">
-
-To run a cloud model, open the terminal and run:
-
-```
-ollama run gpt-oss:120b-cloud
-```
-
- </Tab>
- <Tab title="Python">
-
-First, pull a cloud model so it can be accessed:
-
-```
-ollama pull gpt-oss:120b-cloud
-```
-
-Next, install [Ollama's Python library](https://github.com/ollama/ollama-python):
-
-```
-pip install ollama
+```shell
+export OLLAMA_API_KEY="your_api_key"
```
-Next, create and run a simple Python script:
-
-```python
-from ollama import Client
-
-client = Client()
+Send a request from the same terminal:
-messages = [
- {
- 'role': 'user',
- 'content': 'Why is the sky blue?',
- },
-]
-
-for part in client.chat('gpt-oss:120b-cloud', messages=messages, stream=True):
- print(part['message']['content'], end='', flush=True)
+```shell
+curl https://ollama.com/api/chat \
+ -H "Authorization: Bearer $OLLAMA_API_KEY" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "model": "gemma4:31b",
+ "messages": [
+ {
+ "role": "user",
+ "content": "Say hello in one sentence."
+ }
+ ],
+ "stream": false
+ }'
```
- </Tab>
- <Tab title="JavaScript">
+Read the answer from `message.content`. Keep your API key out of browser code and source control.
-First, pull a cloud model so it can be accessed:
+You can also use [OpenAI](/api/openai-compatibility) or [Anthropic](/api/anthropic-compatibility) clients. Each supports a subset of the original API. No Ollama installation is required.
-```
-ollama pull gpt-oss:120b-cloud
-```
+## Ollama App or CLI
-Next, install [Ollama's JavaScript library](https://github.com/ollama/ollama-js):
+[Download Ollama](https://ollama.com/download). Open the app, or run:
+```shell
+ollama
```
-npm i ollama
-```
-
-Then use the library to run a cloud model:
-```typescript
-import { Ollama } from "ollama";
+Follow the setup prompts and sign in to use cloud models.
-const ollama = new Ollama();
+On macOS, open **Apps** and connect Claude or ChatGPT. For coding agents, run a launch command:
-const response = await ollama.chat({
- model: "gpt-oss:120b-cloud",
- messages: [{ role: "user", content: "Explain quantum computing" }],
- stream: true,
-});
+<CodeGroup>
-for await (const part of response) {
- process.stdout.write(part.message.content);
-}
+```shell Claude Code
+ollama launch claude
```
- </Tab>
- <Tab title="cURL">
-
-First, pull a cloud model so it can be accessed:
-
-```
-ollama pull gpt-oss:120b-cloud
+```shell Codex CLI
+ollama launch codex
```
-Run the following cURL command to run the command via Ollama's API:
-
-```
-curl http://localhost:11434/api/chat -d '{
- "model": "gpt-oss:120b-cloud",
- "messages": [{
- "role": "user",
- "content": "Why is the sky blue?"
- }],
- "stream": false
-}'
+```shell OpenCode
+ollama launch opencode
```
- </Tab>
-</Tabs>
+</CodeGroup>
-## Cloud API access
+For more integrations, open the Ollama app or run `ollama` in your terminal.
-Cloud models can also be accessed directly on ollama.com's API. In this mode, ollama.com acts as a remote Ollama host.
+Ollama handles sign-in for connected apps. See the [quickstart](/quickstart) for setup.
-### Authentication
-
-For direct access to ollama.com's API, first create an [API key](https://ollama.com/settings/keys).
-
-Then, set the `OLLAMA_API_KEY` environment variable to your API key.
-
-```
-export OLLAMA_API_KEY=your_api_key
-```
+## Models
-### Listing models
+Browse [cloud models](https://ollama.com/search?c=cloud), or list them with the API:
-For models available directly via Ollama's API, models can be listed via:
-
-```
+```shell
curl https://ollama.com/api/tags
```
-### Generating a response
-
-<Tabs>
- <Tab title="Python">
-
-First, install [Ollama's Python library](https://github.com/ollama/ollama-python)
-
-```
-pip install ollama
-```
-
-Then make a request
-
-```python
-import os
-from ollama import Client
-
-client = Client(
- host="https://ollama.com",
- headers={'Authorization': 'Bearer ' + os.environ.get('OLLAMA_API_KEY')}
-)
-
-messages = [
- {
- 'role': 'user',
- 'content': 'Why is the sky blue?',
- },
-]
-
-for part in client.chat('gpt-oss:120b', messages=messages, stream=True):
- print(part['message']['content'], end='', flush=True)
-```
-
- </Tab>
- <Tab title="JavaScript">
-
-First, install [Ollama's JavaScript library](https://github.com/ollama/ollama-js):
-
-```
-npm i ollama
-```
-
-Next, make a request to the model:
-
-```typescript
-import { Ollama } from "ollama";
+For API requests to ollama.com, use the name returned by this list, such as `gemma4:31b`. In the Ollama app or CLI, use `gemma4:cloud`. Cloud models do not need to be downloaded.
-const ollama = new Ollama({
- host: "https://ollama.com",
- headers: {
- Authorization: "Bearer " + process.env.OLLAMA_API_KEY,
- },
-});
+## Usage
-const response = await ollama.chat({
- model: "gpt-oss:120b",
- messages: [{ role: "user", content: "Explain quantum computing" }],
- stream: true,
-});
-
-for await (const part of response) {
- process.stdout.write(part.message.content);
-}
-```
-
- </Tab>
- <Tab title="cURL">
-
-Generate a response via Ollama's chat API:
-
-```
-curl https://ollama.com/api/chat \
- -H "Authorization: Bearer $OLLAMA_API_KEY" \
- -d '{
- "model": "gpt-oss:120b",
- "messages": [{
- "role": "user",
- "content": "Why is the sky blue?"
- }],
- "stream": false
- }'
-```
-
- </Tab>
-</Tabs>
-
-## Local only
-
-Ollama can run in local-only mode by [disabling Ollama's cloud](./faq#how-do-i-disable-ollama-cloud-features) features.
+Check your [usage](https://ollama.com/settings/usage) or compare [plans](https://ollama.com/pricing).
## Retirements
-Ollama will occasionally deprecate and retire older cloud models as newer and better open-source models are released.
-Tools and applications relying on Ollama Cloud models may need to be updated to keep working. Impacted users will be
-notified in advance of model deprecation and retirement. Deprecations will be communicated through email and on the
-Ollama website.
-
-Ollama Cloud model retirement does not affect local models.
-
-### Upcoming retirements
-
-| Retirement date | Model | Recommended alternative |
-| --- | --- | --- |
-| July 31, 2026 | `minimax-m2.5` | `minimax-m2.7` |
-| July 31, 2026 | `kimi-k2.5` | `kimi-k2.6` |
-
-### Past retirements
+[Usage settings](https://ollama.com/settings/usage) show upcoming retirements for models you've recently used. Switch models before the retirement date. Downloaded local models are not affected.
-<AccordionGroup>
- <Accordion title="July 15, 2026">
- | Model | Recommended alternative |
- | --- | --- |
- | `deepseek-v3.1:671b` | `deepseek-v4-flash` |
- | `deepseek-v3.2` | `deepseek-v4-flash` |
- | `devstral-2:123b` | `mistral-large-3:675b` |
- | `devstral-small-2:24b` | |
- | `ministral-3:14b` | |
- | `ministral-3:3b` | |
- | `ministral-3:8b` | |
- | `gemini-3-flash-preview` | `minimax-m3` |
- | `gemma3:12b` | `gemma4:31b` |
- | `gemma3:27b` | `gemma4:31b` |
- | `gemma3:4b` | `gemma4:31b` |
- | `glm-4.7` | `glm-5.2` |
- | `glm-5` | `glm-5.2` |
- | `minimax-m2.1` | `minimax-m3` |
- | `qwen3-coder-next` | `qwen3.5:397b` |
- | `qwen3-coder:480b` | `qwen3.5:397b` |
- </Accordion>
+## Data handling
- <Accordion title="June 30, 2026">
- | Model | Recommended alternative |
- | --- | --- |
- | `rnj-1:8b` | |
- </Accordion>
+Ollama processes cloud prompts and responses to answer your requests. We do not use them to train models. Read the [Privacy Policy](https://ollama.com/privacy) for details.
- <Accordion title="June 16, 2026">
- | Model | Recommended alternative |
- | --- | --- |
- | `kimi-k2-thinking` | `kimi-k2.6` |
- | `kimi-k2:1t` | `kimi-k2.6` |
- | `minimax-m2` | `minimax-m3` |
- | `glm-4.6` | `glm-5.1` |
- | `qwen3-next:80b` | `qwen3.5` |
- | `qwen3-vl:235b` | `qwen3.5` |
- | `qwen3-vl:235b-instruct` | `qwen3.5` |
- | `cogito-2.1:671b` | `deepseek-v4-flash` |
- </Accordion>
-</AccordionGroup>
+To use only local models, [disable cloud features](/faq#how-do-i-disable-ollama-cloud-features).
diff --git a/docs/index.mdx b/docs/index.mdx
index 5d7e01a5a..211d051c6 100644
--- a/docs/index.mdx
+++ b/docs/index.mdx
@@ -3,54 +3,38 @@ title: Ollama documentation
sidebarTitle: Welcome
---
-Start building with open models.
-
-Follow the [quickstart](/quickstart), then choose a model, integration, or API.
-
-## Models
-
-Run models locally or use larger models in Ollama's cloud.
+Use open models in your desktop apps and coding agents, or build them into your application.
<CardGroup cols={2}>
- <Card title="Browse models" icon="star" href="https://ollama.com/search">
- Find models for chat, coding, vision, embeddings, and reasoning.
+ <Card title="Use your apps" icon="desktop" href="/quickstart#get-started">
+ Connect Claude or ChatGPT on your desktop, or launch a coding agent from your terminal.
</Card>
-
- <Card title="Cloud models" icon="cloud" href="/cloud">
- Run larger models on Ollama's Cloud without the download.
+ <Card title="Build an application" icon="code" href="/quickstart#build-an-application">
+ Call cloud models with Ollama, OpenAI, or Anthropic APIs.
</Card>
</CardGroup>
-## Next steps
+## Explore models
-Connect Ollama to an app, or build with the API.
+Choose cloud models or run models on your computer.
<CardGroup cols={2}>
- <Card title="Integrations" icon="plug" href="/integrations">
- Connect Ollama to an app, editor, or agent.
+ <Card title="Cloud models" icon="cloud" href="/cloud">
+ Run models without a local GPU.
</Card>
-
- <Card title="First API request" icon="code" href="/api/introduction">
- Learn the local and cloud base URLs, then send a request with `curl`.
+ <Card title="Local models" icon="hard-drive" href="/quickstart#run-a-model-locally">
+ Download Ollama and run a model on your computer.
</Card>
+</CardGroup>
- <Card title="Python library" icon="python" href="https://github.com/ollama/ollama-python">
- Use Ollama from Python.
- </Card>
+Browse the [model library](https://ollama.com/search) for coding, vision, embeddings, and reasoning models.
- <Card title="JavaScript library" icon="js" href="https://github.com/ollama/ollama-js">
- Use Ollama from JavaScript or TypeScript.
- </Card>
-</CardGroup>
+## Documentation
-## Community
+- [Integrations](/integrations) — connect an app, editor, or agent.
+- [API reference](/api/introduction) — use Ollama's API or compatible OpenAI and Anthropic clients.
+- [Python library](https://github.com/ollama/ollama-python) and [JavaScript library](https://github.com/ollama/ollama-js) — use Ollama from your application.
-<CardGroup cols={2}>
- <Card title="Discord" icon="discord" href="https://discord.gg/ollama">
- Join the Ollama Discord.
- </Card>
+## Community
- <Card title="Reddit" icon="reddit" href="https://reddit.com/r/ollama">
- Join the Ollama subreddit.
- </Card>
-</CardGroup>
+Join the conversation on [Discord](https://discord.gg/ollama) or [Reddit](https://reddit.com/r/ollama).
diff --git a/docs/integrations/claude-code.mdx b/docs/integrations/claude-code.mdx
index 499b8c833..b27b8834f 100644
--- a/docs/integrations/claude-code.mdx
+++ b/docs/integrations/claude-code.mdx
@@ -2,7 +2,7 @@
title: Claude Code
---
-[Claude Code](https://code.claude.com/docs/en/overview) is an agentic coding tool that reads your codebase, edits files, and runs commands.
+[Claude Code](https://code.claude.com/docs/en/overview) reads your codebase, edits files, and runs commands.
Ollama connects Claude Code to local and cloud models through its Anthropic-compatible API.
@@ -155,6 +155,23 @@ Claude Code prompts for permission on most actions. To allow the bot to work aut
See the [plugin README](https://github.com/anthropics/claude-plugins-official/tree/main/external_plugins/telegram) for setup instructions.
+## Connect directly to Ollama Cloud
+
+Install Claude Code, then set your [API key](/quickstart#build-an-application) in `OLLAMA_API_KEY`. No Ollama installation required.
+
+In Bash or Zsh, run:
+
+```shell
+ANTHROPIC_BASE_URL=https://ollama.com \
+ANTHROPIC_AUTH_TOKEN="$OLLAMA_API_KEY" \
+ANTHROPIC_API_KEY="" \
+claude --model glm-5.3-flash
+```
+
+Use `ANTHROPIC_AUTH_TOKEN` for bearer authentication. Claude settings can override shell variables. Update any base URL or credentials in those settings, then run `/status` to check the connection.
+
+Choose a [cloud model](https://ollama.com/search?c=cloud) that supports tools. Basic chat and file edits work with compatible models. Hosted WebSearch and advanced tool controls are not fully supported. See [Anthropic compatibility](/api/anthropic-compatibility).
+
## Manual setup
<p className="manual-step-title">1. Install Claude Code</p>
diff --git a/docs/integrations/claude-desktop.mdx b/docs/integrations/claude-desktop.mdx
index 2792bff4a..3bfa3b176 100644
--- a/docs/integrations/claude-desktop.mdx
+++ b/docs/integrations/claude-desktop.mdx
@@ -7,7 +7,7 @@ description: Use Ollama models in Claude on macOS.
## Prerequisites
- [Ollama](https://ollama.com/download/). Windows support coming soon.
-- To use a local model, [download it](/quickstart#3-start-a-chat) before setup.
+- To use a local model, [download it](/quickstart#run-a-model-locally) before setup.
- To use a cloud model, sign in to Ollama and enable cloud models. Some models require a [paid plan](https://ollama.com/pricing).
If Claude is not installed, Ollama offers to download it during setup.
@@ -15,12 +15,12 @@ If Claude is not installed, Ollama offers to download it during setup.
## Set up Claude
1. Open Ollama and select **Apps**.
-2. Toggle Claude to On.
-3. If Claude is not installed, Ollama will download and finish the installation.
+2. Connect **Claude**.
+3. Follow the setup prompts to install Claude if needed and restart it when prompted.
## Switch models
-Open Ollama **Settings**. Under **Apps**, choose a model you want to use, then select **Restart Claude**. You can assign the same Ollama model to more than one option.
+Open Ollama **Settings → Apps**. Choose your models, then select **Restart Claude**. You can use the same model for more than one option.
## Supported features
@@ -31,7 +31,7 @@ Open Ollama **Settings**. Under **Apps**, choose a model you want to use, then s
## Disconnect Claude
-Open Ollama **Apps** and turn Claude off. Ollama restores Claude's previous configuration. If Claude is open, Ollama asks to restart it so the change takes effect.
+Open Ollama **Apps** and disconnect Claude. Ollama restores Claude's previous settings. Restart Claude when prompted.
You can also restore Claude from the terminal:
diff --git a/docs/integrations/cline.mdx b/docs/integrations/cline.mdx
index 371fc6288..075f0a1eb 100644
--- a/docs/integrations/cline.mdx
+++ b/docs/integrations/cline.mdx
@@ -13,7 +13,7 @@ Install [Cline](https://docs.cline.bot/getting-started/installing-cline) in your
2. Select a model under `Model` or type one (e.g. `qwen3`)
3. Update the context window to at least 32K tokens under `Context Window`
-<Note>Coding tools require a larger context window. It is recommended to use a context window of at least 32K tokens. See [Context length](/context-length) for more information.</Note>
+<Note>Use a [context window](/context-length) of at least 32K tokens for coding.</Note>
<div style={{ display: 'flex', justifyContent: 'center' }}>
<img
@@ -32,7 +32,6 @@ Install [Cline](https://docs.cline.bot/getting-started/installing-cline) in your
4. Select a model from the list
-### Recommended Models
+### Models
-- `qwen3-coder:480b`
-- `deepseek-v3.1:671b`
+Choose a [cloud model](https://ollama.com/search?c=cloud) that supports tool calling.
diff --git a/docs/integrations/codex.mdx b/docs/integrations/codex.mdx
index 18812a61c..ac20a3c30 100644
--- a/docs/integrations/codex.mdx
+++ b/docs/integrations/codex.mdx
@@ -13,7 +13,7 @@ npm install -g @openai/codex
## Usage with Ollama
-<Note>Codex requires a larger context window. It is recommended to use a context window of at least 64k tokens.</Note>
+<Note>Use a context window of at least 64k tokens for Codex.</Note>
### Quick setup
@@ -77,7 +77,7 @@ Then run:
codex --profile ollama-launch
```
-## Web search
+## Web search through local Ollama
Codex web-search requests sent through the Ollama profile are executed by
Ollama for both local and cloud models. Sign in with `ollama signin` to use the
diff --git a/docs/integrations/index.mdx b/docs/integrations/index.mdx
index 8bfa4ae35..3046a7350 100644
--- a/docs/integrations/index.mdx
+++ b/docs/integrations/index.mdx
@@ -4,18 +4,18 @@ title: Overview
Use Ollama from coding agents, personal assistants, and editors.
-Run `ollama launch` to see the latest integrations you can run from the terminal.
+Run `ollama launch` to choose an integration.
## Code in the terminal
<CardGroup cols={2}>
<Card title="Claude Code" icon="/images/launch-icons/claude-code.svg" href="/integrations/claude-code">
- Terminal coding agent with tools, vision, web search, and long context.
+ Read code, edit files, and run commands.
</Card>
<Card title="OpenCode" icon="/images/launch-icons/opencode.svg" href="/integrations/opencode">
- Open-source coding agent that edits, runs, and iterates on code.
+ Edit and run code from your terminal.
</Card>
<Card title="DeepSeek Harness" icon="/images/launch-icons/deepseek-harness.svg" href="/integrations/deepseek-harness">
@@ -25,7 +25,7 @@ Run `ollama launch` to see the latest integrations you can run from the terminal
## Connect an assistant
-Use open models in assistant apps.
+On macOS, open Ollama **Apps** and connect Claude or ChatGPT.
<CardGroup cols={2}>
<Card title="Claude" href="/integrations/claude-desktop">
diff --git a/docs/quickstart.mdx b/docs/quickstart.mdx
index c985d6d80..683251994 100644
--- a/docs/quickstart.mdx
+++ b/docs/quickstart.mdx
@@ -2,59 +2,300 @@
title: Quickstart
---
-Install Ollama and get your first response.
+Use Ollama in [desktop apps](#connect-a-desktop-app) and [coding agents](#use-a-coding-agent), or [build an application](#build-an-application) with an API key.
-## 1. Download Ollama
+## Get started
-Ollama runs on macOS, Windows, and Linux.
+[Download Ollama](https://ollama.com/download) for macOS, Windows, or Linux. Open the app, or get started from your terminal:
-<a
- href="https://ollama.com/download"
- target="_blank"
- className="inline-block px-6 py-2 bg-black rounded-full dark:bg-neutral-700 text-white font-normal border-none"
->
- Download Ollama
-</a>
+```shell
+ollama
+```
+
+Follow the setup prompts. Sign in to use cloud models, or choose a local model.
+
+## Connect a desktop app
+
+On macOS, open Ollama and select **Apps**. Connect **Claude** or **ChatGPT (Desktop)**. Follow the prompts to install or restart the app.
-## 2. Open the menu
+Choose your Ollama models in **Settings → Apps**.
-Run `ollama` in your terminal to open the interactive menu:
+- [Claude Desktop](/integrations/claude-desktop) — use Ollama models in Claude.
+- [ChatGPT Desktop](/integrations/chatgpt) — use Ollama models in Codex mode. Regular Chat and voice use your usual ChatGPT connection.
+
+## Use a coding agent
+
+From your project directory, launch your agent:
+
+<Tabs>
+ <Tab title="Claude Code">
```shell
-ollama
+ollama launch claude
```
-From the menu you can:
-
-- **Run a model** - Start an interactive chat
-- **Launch tools** - [Claude Code](/integrations/claude-code), [OpenClaw](/integrations/openclaw), [VS Code](/integrations/vscode), and more
+Ollama offers to install Claude Code if needed. See [Claude Code](/integrations/claude-code) for details.
-## 3. Start a chat
+ </Tab>
+ <Tab title="Codex CLI">
-Run a model to start your first chat.
+[Install Codex CLI](/integrations/codex#install) first, then launch it:
```shell
-ollama run gemma4
+ollama launch codex
```
-Cloud models work the same way:
+See [Codex CLI](/integrations/codex) for setup.
+
+ </Tab>
+ <Tab title="OpenCode">
```shell
-ollama run gemma4:cloud
+ollama launch opencode
```
-Send your first message:
+Ollama offers to install OpenCode if needed. See [OpenCode](/integrations/opencode) for details.
+
+ </Tab>
+</Tabs>
+
+Choose a model when prompted, then try:
```text
-Explain why the sky is blue in one paragraph.
+Explain how this repository is organized.
+```
+
+For more tools, see [Integrations](/integrations). To connect an agent directly with an API key, see [Claude Code](/integrations/claude-code#connect-directly-to-ollama-cloud).
+
+## Build an application
+
+Use cloud models with an API key, or run models locally without one. Cloud requests do not require an Ollama installation.
+
+### 1. Create an API key
+
+For local models, skip this step and select **Local** under [Send a request](#2-send-a-request).
+
+For cloud models, sign in or create an account, then create an [API key](https://ollama.com/settings/keys).
+
+Set your key in the terminal:
+
+<CodeGroup>
+
+```shell macOS / Linux
+export OLLAMA_API_KEY="your_api_key"
+```
+
+```powershell Windows
+$env:OLLAMA_API_KEY = "your_api_key"
+```
+
+</CodeGroup>
+
+Keep your key on your application's server, outside browser code and source control.
+
+### 2. Send a request
+
+Make your first request to Ollama
+
+<Tabs>
+ <Tab title="Cloud">
+
+These examples use the `gemma4:31b` [cloud model](https://ollama.com/search?c=cloud).
+
+<Tabs>
+ <Tab title="Ollama API">
+
+```shell
+curl https://ollama.com/api/chat \
+ -H "Authorization: Bearer $OLLAMA_API_KEY" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "model": "gemma4:31b",
+ "messages": [
+ {
+ "role": "user",
+ "content": "Say hello in one sentence."
+ }
+ ],
+ "stream": false
+ }'
+```
+
+Read the answer from `message.content`. See [Ollama's API and libraries](/api/introduction).
+
+ </Tab>
+ <Tab title="OpenAI Chat Completions">
+
+```shell
+curl https://ollama.com/v1/chat/completions \
+ -H "Authorization: Bearer $OLLAMA_API_KEY" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "model": "gemma4:31b",
+ "messages": [
+ {
+ "role": "user",
+ "content": "Say hello in one sentence."
+ }
+ ]
+ }'
+```
+
+Read the answer from `choices[0].message.content`. See [OpenAI compatibility](/api/openai-compatibility) for client setup and supported features.
+
+ </Tab>
+ <Tab title="OpenAI Responses">
+
+```shell
+curl https://ollama.com/v1/responses \
+ -H "Authorization: Bearer $OLLAMA_API_KEY" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "model": "gemma4:31b",
+ "input": "Say hello in one sentence."
+ }'
+```
+
+Read the `output_text` content blocks inside `output`. The OpenAI Python client exposes the text as `response.output_text`.
+
+Responses requests are stateless: include conversation history in each request. `previous_response_id` and `conversation` aren't supported. See [Responses compatibility](/api/openai-compatibility#responses-api).
+
+ </Tab>
+ <Tab title="Anthropic Messages">
+
+```shell
+curl https://ollama.com/v1/messages \
+ -H "Authorization: Bearer $OLLAMA_API_KEY" \
+ -H "Content-Type: application/json" \
+ -H "anthropic-version: 2023-06-01" \
+ -d '{
+ "model": "gemma4:31b",
+ "max_tokens": 1024,
+ "messages": [
+ {
+ "role": "user",
+ "content": "Say hello in one sentence."
+ }
+ ]
+ }'
+```
+
+Read text blocks from `content`. Direct cloud requests use bearer authentication. See [Anthropic compatibility](/api/anthropic-compatibility) for client setup and supported features.
+
+ </Tab>
+</Tabs>
+
+OpenAI and Anthropic compatibility each cover a subset of the original API. See [Cloud](/cloud) for models and usage limits.
+
+ </Tab>
+ <Tab title="Local">
+
+Run [Gemma 4 E2B](https://ollama.com/library/gemma4:e2b) on your computer. No API key required.
+
+<Note>
+The model download is about 7.2 GB. We recommend 8 GB of available VRAM, or unified memory on a Mac. Larger context windows need more memory. With less VRAM, Ollama can use system RAM, but responses may be slower.
+</Note>
+
+[Download Ollama](https://ollama.com/download) and open the app. On Linux, start the server with `ollama serve` if it is not already running.
+
+Download the model:
+
+```shell
+ollama pull gemma4:e2b
+```
+
+Send a request to your local server:
+
+<Tabs>
+ <Tab title="Ollama API">
+
+```shell
+curl http://localhost:11434/api/chat \
+ -H "Content-Type: application/json" \
+ -d '{
+ "model": "gemma4:e2b",
+ "messages": [
+ {
+ "role": "user",
+ "content": "Say hello in one sentence."
+ }
+ ],
+ "stream": false
+ }'
+```
+
+ </Tab>
+ <Tab title="OpenAI Chat Completions">
+
+```shell
+curl http://localhost:11434/v1/chat/completions \
+ -H "Content-Type: application/json" \
+ -d '{
+ "model": "gemma4:e2b",
+ "messages": [
+ {
+ "role": "user",
+ "content": "Say hello in one sentence."
+ }
+ ]
+ }'
+```
+
+Read the answer from `choices[0].message.content`. See [OpenAI compatibility](/api/openai-compatibility) for client setup and supported features.
+
+ </Tab>
+ <Tab title="OpenAI Responses">
+
+```shell
+curl http://localhost:11434/v1/responses \
+ -H "Content-Type: application/json" \
+ -d '{
+ "model": "gemma4:e2b",
+ "input": "Say hello in one sentence."
+ }'
```
-To leave the chat, type:
+Read the `output_text` content blocks inside `output`. The OpenAI Python client exposes the text as `response.output_text`.
+
+Responses requests are stateless: include conversation history in each request. `previous_response_id` and `conversation` aren't supported. See [Responses compatibility](/api/openai-compatibility#responses-api).
+
+ </Tab>
+ <Tab title="Anthropic Messages">
```shell
-/bye
+curl http://localhost:11434/v1/messages \
+ -H "Content-Type: application/json" \
+ -H "anthropic-version: 2023-06-01" \
+ -d '{
+ "model": "gemma4:e2b",
+ "max_tokens": 1024,
+ "messages": [
+ {
+ "role": "user",
+ "content": "Say hello in one sentence."
+ }
+ ]
+ }'
```
+Read text blocks from `content`. See [Anthropic compatibility](/api/anthropic-compatibility) for client setup and supported features.
+
+ </Tab>
+</Tabs>
+
+ </Tab>
+</Tabs>
+
+## Run a model locally
+
+[Download Ollama](https://ollama.com/download), then run:
+
+```shell
+ollama run gemma4:e2b
+```
+
+Ollama downloads the model and starts a chat on your computer. Type `/bye` to leave.
+
## Next steps
-Use a model with an [integration](/integrations), make an [API request](/api/introduction), or browse more [models](https://ollama.com/search).
+Add [tool calling](/capabilities/tool-calling), [stream responses](/capabilities/streaming), or browse [more models](https://ollama.com/search).