Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
Merge remote-tracking branch 'origin/main' into docs_update
Anna Rahn266790cffe58
diff --cc docs/api.mdindex 26d9247e3,595f7857e..7617a1bfc--- a/docs/api.md+++ b/docs/api.md@@@ -1192,10 -1195,11 +1195,11 @@@ If you are creating a model from a safe- `parser`: (optional) the name of the parser for the model- `license`: (optional) a string or list of strings containing the license or licenses for the model- `system`: (optional) a string containing the system prompt for the model-- `parameters`: (optional) a dictionary of parameters for the model (see [Modelfile](./modelfile.mdx#valid-parameters-and-values) for a list of parameters)+- `parameters`: (optional) a dictionary of parameters for the model (see [Modelfile](./local/modelfile.mdx#valid-parameters-and-values) for a list of parameters)- `messages`: (optional) a list of message objects used to create a conversation+ - `capabilities`: (optional) capabilities to add without removing inherited or inferred capabilities, such as `["decision"]` for compatible decision models- `stream`: (optional) if `false` the response will be returned as a single response object, rather than a stream of objects- - `quantize` (optional): quantize a non-quantized (e.g. float16) model+ - `quantize`: (optional) quantize safetensors model weights for MLX during import#### Quantization typesdiff --cc docs/api/authentication.mdxindex 03d802fb3,ad8417d4e..3c5769130--- a/docs/api/authentication.mdx+++ b/docs/api/authentication.mdx@@@ -2,18 -2,36 +2,36 @@@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.++Keep keys outside browser code and source control. See the [API quickstart](/guide/quickstart#build-an-application) for shell setup and compatibility examples.## Signing indiff --cc docs/api/introduction.mdxindex 2d31af4cb,2d7a73d4b..9ab8ec7e8--- a/docs/api/introduction.mdx+++ b/docs/api/introduction.mdx@@@ -1,54 -1,49 +1,56 @@@---title: Introduction+description: Use the Ollama API locally or through Ollama Cloud with a shared request format.---- Use Ollama's API to run and interact with models.+ Use Ollama's API to build applications with cloud or local models.## Get started-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).+Choose how the request reaches the model:-To run models on your computer, [install Ollama and run a local model](/quickstart#run-a-model-locally).+| Access path | Model runs on | Base URL | Authentication and model name |+| --- | --- | --- | --- |+| [Local model](/local) | Your hardware | `http://localhost:11434/api` | None by default; use the local model name |+| [Cloud model through Ollama](/cloud/models) | Ollama Cloud | `http://localhost:11434/api` | Run `ollama signin`; use a model name ending in `:cloud` |+| [Direct Cloud API](/cloud/api) | Ollama Cloud | `https://ollama.com/api` | Send an Ollama API key; use the Cloud API model name |++Request bodies have the same shape for shared endpoints. The host, authentication, and model name depend on the access path.- ## Local API+ ## Base URLs- After you [install Ollama](/local), its API is served by default at:+ | 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` |- ```- http://localhost:11434/api- ```-- ## Cloud API-- For direct access to models hosted on Ollama Cloud, use:+ 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).- Cloud API requests require an API key. See [Cloud API authentication](/cloud/api#authentication).-Creating or deleting models requires a local Ollama server. [System One](/capabilities/decision) also requires a local server and is not yet available on Ollama Cloud. For supported API features, see [OpenAI compatibility](/api/openai-compatibility) and [Anthropic compatibility](/api/anthropic-compatibility).++Creating or deleting models requires a local Ollama server. [System One](/guide/capabilities/decision) also requires a local server and is not yet available on Ollama Cloud. For supported API features, see [OpenAI compatibility](/api/openai-compatibility) and [Anthropic compatibility](/api/anthropic-compatibility).- ## Example request+ ## Ollama API example- Once Ollama is running locally, its API is automatically available and can be accessed with `curl`:+ 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)diff --cc docs/cloud/index.mdxindex d82f785d3,000000000..0748a1054mode 100644,000000..100644--- a/docs/cloud/index.mdx+++ b/docs/cloud/index.mdx@@@ -1,39 -1,0 +1,47 @@@+---+title: Ollama Cloud+sidebarTitle: Overview+description: Choose how to run Ollama Cloud models through the Ollama CLI, a local API, or the direct Cloud API.+---++Ollama Cloud runs larger models without requiring a powerful GPU. Cloud models support the same capabilities as local models, but inference runs on Ollama's cloud service.++## Choose how to connect++<CardGroup cols={2}>+ <Card title="Use Cloud models from Ollama" icon="terminal" href="/cloud/models">+ Use the Ollama CLI, Python or JavaScript library, or your local Ollama API. Cloud model names use the `:cloud` suffix.+ </Card>++ <Card title="Call the Cloud API directly" icon="cloud" href="/cloud/api">+ Send authenticated requests to `https://ollama.com/api` without installing Ollama.+ </Card>+</CardGroup>++Both options require an Ollama account. Browse the available models in the [cloud model library](https://ollama.com/search?c=cloud).++## Cloud models++Follow [Use Cloud models from Ollama](/cloud/models) to run a `:cloud` model from the CLI, official libraries, or the local Ollama API.++## Cloud API access++Follow the [Cloud API guide](/cloud/api) to call `https://ollama.com/api` directly with an API key.++## Local only++Use [Local](/local) when you want inference to run on your own hardware. Ollama can also run in [local-only mode](/local/faq#how-do-i-disable-ollama-cloud-features) with Cloud features disabled.++## Retirements++Cloud models may be deprecated as newer models become available. See [Cloud model lifecycle](/cloud/model-lifecycle) for upcoming and past retirements.+++## Usage++++Check your [usage](https://ollama.com/settings/usage) or compare [plans](https://ollama.com/pricing).++++## Data handling++++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.+++For questions about Cloud accounts, privacy, authentication, and requests, see the [Cloud FAQ](/cloud/faq).diff --cc docs/docs.jsonindex 50cd98b49,44a655bcd..d2aac09fb--- a/docs/docs.json+++ b/docs/docs.json@@@ -99,94 -107,6 +107,98 @@@{"source": "/integrations/poolside","destination": "/integrations/pool"+ },+ {+ "source": "/quickstart",+ "destination": "/guide/quickstart"+ },+ {+ "source": "/capabilities/streaming",+ "destination": "/guide/capabilities/streaming"+ },+ {+ "source": "/capabilities/thinking",+ "destination": "/guide/capabilities/thinking"+ },+ {+ "source": "/capabilities/structured-outputs",+ "destination": "/guide/capabilities/structured-outputs"+ },++ {++ "source": "/capabilities/decision",++ "destination": "/guide/capabilities/decision"++ },+ {+ "source": "/capabilities/vision",+ "destination": "/guide/capabilities/vision"+ },+ {+ "source": "/capabilities/embeddings",+ "destination": "/guide/capabilities/embeddings"+ },+ {+ "source": "/capabilities/tool-calling",+ "destination": "/guide/capabilities/tool-calling"+ },+ {+ "source": "/capabilities/web-search",+ "destination": "/guide/capabilities/web-search"+ },+ {+ "source": "/sample-projects/research-brief-agent",+ "destination": "/guide/sample-projects/research-report-agent"+ },+ {+ "source": "/guide/sample-projects/research-brief-agent",+ "destination": "/guide/sample-projects/research-report-agent"+ },+ {+ "source": "/cli",+ "destination": "/local/cli"+ },+ {+ "source": "/context-length",+ "destination": "/local/context-length"+ },+ {+ "source": "/macos",+ "destination": "/local/macos"+ },+ {+ "source": "/linux",+ "destination": "/local/linux"+ },+ {+ "source": "/windows",+ "destination": "/local/windows"+ },+ {+ "source": "/docker",+ "destination": "/local/docker"+ },+ {+ "source": "/import",+ "destination": "/local/import"+ },+ {+ "source": "/modelfile",+ "destination": "/local/modelfile"+ },+ {+ "source": "/gpu",+ "destination": "/local/gpu"+ },+ {+ "source": "/troubleshooting",+ "destination": "/local/troubleshooting"+ },+ {+ "source": "/faq",+ "destination": "/local/faq"+ },+ {+ "source": "/template",+ "destination": "/local/template"}],"navigation": {@@@ -204,69 -125,14 +216,70 @@@{"group": "Capabilities","pages": [- "/capabilities/streaming",- "/capabilities/thinking",- "/capabilities/structured-outputs",- "/capabilities/decision",- "/capabilities/vision",- "/capabilities/embeddings",- "/capabilities/tool-calling",- "/capabilities/web-search"+ "/guide/capabilities/streaming",+ "/guide/capabilities/thinking",+ "/guide/capabilities/structured-outputs",++ "/guide/capabilities/decision",+ "/guide/capabilities/vision",+ "/guide/capabilities/embeddings",+ "/guide/capabilities/tool-calling",+ "/guide/capabilities/web-search"+ ]+ },+ {+ "group": "Sample projects",+ "pages": [+ "/guide/sample-projects/research-report-agent"+ ]+ }+ ]+ },+ {+ "tab": "Local",+ "groups": [+ {+ "group": "Get started",+ "pages": [+ "/local/index",+ "/local/macos",+ "/local/linux",+ "/local/windows",+ "/local/docker"+ ]+ },+ {+ "group": "Run and configure",+ "pages": [+ "/local/cli",+ "/local/context-length"+ ]+ },+ {+ "group": "Customize models",+ "pages": [+ "/local/import",+ "/local/modelfile"+ ]+ },+ {+ "group": "Hardware and support",+ "pages": [+ "/local/gpu",+ "/local/troubleshooting",+ "/local/faq"+ ]+ }+ ]+ },+ {+ "tab": "Cloud",+ "groups": [+ {+ "group": "Get started",+ "pages": [+ "/cloud/index",+ "/cloud/models",+ "/cloud/api"]},{diff --cc docs/guide/capabilities/decision.mdxindex 000000000,264092e9f..5bb16b5c9mode 000000,100644..100644--- a/docs/guide/capabilities/decision.mdx+++ b/docs/guide/capabilities/decision.mdx@@@ -1,0 -1,165 +1,165 @@@+ ---+ title: Decision+ description: Classify text, estimate yes/no probabilities, and score ordered criteria.+ ---++ <Note>+ Currently available locally in Ollama.+ </Note>++ Use System One to classify text, answer yes/no questions, or score text against a rubric.++ See the [full list of decision models](https://ollama.com/search?c=decision).++ ## Setup+-Start [Ollama](/quickstart) v0.35.0 or later, then download [Nimble](https://ollama.com/library/nimble):++Start [Ollama](/guide/quickstart) v0.35.0 or later, then download [Nimble](https://ollama.com/library/nimble):++ ```shell setup.sh+ ollama pull nimble+ ```++ Nimble, Tev1, [Clef](https://ollama.com/library/clef), and [Clef Flash](https://ollama.com/library/clef-flash) are decision models. The Clef models can also judge images and require v0.35.1 or later.++ Local requests do not need an API key.++ ## Choose a label++ Put your input in `state` and describe the possible answers in `criteria`:++ ```shell choice.sh+ curl http://localhost:11434/v1/systemone \+ -H 'Content-Type: application/json' \+ -d '{+ "model": "nimble",+ "state": "Our checkout has returned 500 errors since 9am.",+ "questions": {+ "label": {+ "type": "choice",+ "instructions": "Which label fits this ticket?",+ "criteria": {+ "billing": "Payments and refunds",+ "bug": "Software errors",+ "account": "Login and account access"+ }+ }+ }+ }'+ ```++ Example response:++ ```json+ {+ "model": "nimble",+ "answers": {+ "label": {+ "type": "choice",+ "choice": "bug",+ "probabilities": {"billing": 0.0125, "bug": 0.9781, "account": 0.0093},+ "confidence": 0.8906+ }+ },+ "usage": {"input_tokens": 174, "output_tokens": 1}+ }+ ```++ ## Judge an image++ [Clef](https://ollama.com/library/clef) and [Clef Flash](https://ollama.com/library/clef-flash) read images alongside the state. Send base64-encoded PNG, JPEG, or WebP files in `images`; they are shared by all questions, in request order. URLs and data URLs are not accepted. `state` is still required — it holds the context for the decision.++ ```shell image.sh+ curl http://localhost:11434/v1/systemone \+ -H 'Content-Type: application/json' \+ -d '{+ "model": "clef-flash",+ "state": "A user took this screenshot and wants to know what it shows.",+ "images": ["<base64-encoded image>"],+ "questions": {+ "has_ollama": {+ "type": "noul",+ "instructions": "Does this image contain Ollama?"+ },+ "app": {+ "type": "choice",+ "instructions": "Which application is shown in this screenshot?",+ "criteria": {+ "vscode": "Visual Studio Code",+ "terminal": "A terminal emulator",+ "browser": "A web browser",+ "other": "A different application"+ }+ }+ }+ }'+ ```++ Example response:++ ```json+ {+ "model": "clef-flash",+ "answers": {+ "has_ollama": {"type": "noul", "noul": 0.959},+ "app": {+ "type": "choice",+ "choice": "vscode",+ "probabilities": {"vscode": 0.966, "other": 0.017, "browser": 0.010, "terminal": 0.007},+ "confidence": 0.868+ }+ },+ "usage": {"input_tokens": 677, "output_tokens": 0}+ }+ ```++ ## Question types++ | Type | Criteria | Result |+ | --- | --- | --- |+ | `choice` | 2–26 named options with descriptions | The most likely option and each option's probability |+ | `noul` | Descriptions for `"false"` and `"true"` | The probability of `true`, from 0 to 1 |+ | `score` | 2–26 descriptions, ordered from lowest to highest | The probability-weighted average of the zero-based levels |++ For the urgency criteria below:++ ```text+ score = 0 × P(Routine) + 1 × P(Soon) + 2 × P(Immediate)+ ```++ For `choice` and `score`, `confidence` measures how strongly the model favors one answer over the others, from 0 to 1. A higher value does not guarantee the answer is correct.++ ## Ask multiple questions++ Combine question types in one request. Here, both questions use the same ticket:++ ```shell multiple.sh+ curl http://localhost:11434/v1/systemone \+ -H 'Content-Type: application/json' \+ -d '{+ "model": "nimble",+ "state": {"ticket": "I was charged twice. Please refund the extra payment."},+ "questions": {+ "refund": {+ "type": "noul",+ "instructions": "Is the customer requesting a refund?",+ "criteria": {+ "false": "No refund is requested",+ "true": "The customer requests a refund"+ }+ },+ "urgency": {+ "type": "score",+ "instructions": "How urgently does this ticket need a response?",+ "criteria": [+ "Routine: no time pressure",+ "Soon: a customer is inconvenienced",+ "Immediate: a critical service is unavailable"+ ]+ }+ }+ }'+ ```++ This returns a refund probability of `0.9989` and an urgency score of `0.8308` on the 0–2 scale (rounded). Results can vary with the model and configuration.++ See the [API reference](/api/systemone) for request fields, limits, errors, and token usage.diff --cc docs/guide/capabilities/thinking.mdxindex 4e58c1d73,b357ccd86..2a8dde8f8--- a/docs/guide/capabilities/thinking.mdx+++ b/docs/guide/capabilities/thinking.mdx@@@ -16,11 -36,16 +36,16 @@@ The response includes a top-level `thin## Enable thinking in API calls- Set the `think` field on chat or generate requests. Most models accept booleans (`true`/`false`) or levels (`low`, `medium`, `high`, `max`), where `max` requests the highest thinking level.+ Set the `think` field on a chat or generate request:- GPT-OSS instead expects one of `low`, `medium`, or `high` to tune the trace length.+ - `true`: request thinking output.+ - `false`: request no thinking output, if the model permits it.+ - `null`: use the model default.+ - A string: select a supported level from `thinking.values`. Use the exact value from `/api/show`. Numbers are not supported.- The `message.thinking` (chat endpoint) or `thinking` (generate endpoint) field contains the reasoning trace while `message.content` / `response` holds the final answer.-If the model resolves named levels from `/api/show` metadata, Ollama applies supported names exactly. Unsupported names use the model default.++If the model resolves named levels from `/api/show` metadata, Ollama applies supported names exactly. Unsupported names use the model default.++ The reasoning output and answer use separate fields. Chat returns `message.thinking` and `message.content`. Generate returns `thinking` and `response`.<Tabs><Tab title="cURL">diff --cc docs/guide/quickstart.mdxindex 4f3f54ea9,683251994..dbd34c5ed--- a/docs/guide/quickstart.mdx+++ b/docs/guide/quickstart.mdx@@@ -1,78 -1,301 +1,302 @@@---title: Quickstart- description: Choose Ollama Cloud or a local installation and run your first model.++description: Use Ollama with desktop apps, coding agents, cloud APIs, or models running on your computer.---- Get your first response from a cloud or local model. The Ollama CLI and API work with both.+ 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.- ## Choose an environment+ ## Get started- <CardGroup cols={2}>- <Card title="Cloud" icon="cloud" href="/cloud">- Use larger models without providing your own GPU. Start from the Ollama CLI or call the Cloud API directly.- </Card>+ [Download Ollama](https://ollama.com/download) for macOS, Windows, or Linux. Open the app, or get started from your terminal:- <Card title="Local" icon="laptop" href="/local">- Run models on your own hardware. Start by installing Ollama for your operating system.- </Card>- </CardGroup>+ ```shell+ ollama+ ```- ## Run a model from the CLI+ Follow the setup prompts. Sign in to use cloud models, or choose a local model.- This path works with local models and cloud models.+ ## Connect a desktop app- ### 1. Download Ollama+ On macOS, open Ollama and select **Apps**. Connect **Claude** or **ChatGPT (Desktop)**. Follow the prompts to install or restart the app.- Ollama runs on macOS, Windows, and Linux.+ Choose your Ollama models in **Settings → Apps**.- <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>+ - [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.- ### 2. Open the menu+ ## Use a coding agent- Run `ollama` in your terminal to open the interactive menu:+ 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```- Or sign in and run a cloud model:+ See [Codex CLI](/integrations/codex) for setup.++ </Tab>+ <Tab title="OpenCode">```shell- ollama signin- 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"```- To leave the chat, type:+ </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- /bye+ 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."+ }'+ ```++ 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 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- Learn about [Cloud](/cloud) or [Local](/local), use a model with an [integration](/integrations), make an [API request](/api/introduction), or browse [models](https://ollama.com/search).-Add [tool calling](/capabilities/tool-calling), [stream responses](/capabilities/streaming), or browse [more models](https://ollama.com/search).++Add [tool calling](/guide/capabilities/tool-calling), [stream responses](/guide/capabilities/streaming), or browse [more models](https://ollama.com/search).diff --cc docs/index.mdxindex afb4e075e,211d051c6..228472536--- a/docs/index.mdx+++ b/docs/index.mdx@@@ -1,56 -1,39 +1,63 @@@---title: Ollama documentationsidebarTitle: Welcome+description: Learn what Ollama can do, choose cloud or local models, and find the right guide, integration, or API reference.---- Build with open models in Ollama Cloud or on your own hardware.+ Use open models in your desktop apps and coding agents, or build them into your application.- Follow the [quickstart](/guide/quickstart), then choose the environment that matches your needs.+ <CardGroup cols={2}>- <Card title="Use your apps" icon="desktop" href="/quickstart#get-started">++ <Card title="Use your apps" icon="desktop" href="/guide/quickstart#get-started">+ Connect Claude or ChatGPT on your desktop, or launch a coding agent from your terminal.+ </Card>- <Card title="Build an application" icon="code" href="/quickstart#build-an-application">++ <Card title="Build an application" icon="code" href="/guide/quickstart#build-an-application">+ Call cloud models with Ollama, OpenAI, or Anthropic APIs.+ </Card>+ </CardGroup>-## Explore models+## Choose where models run-Choose cloud models or run models on your computer.+Cloud and local models use the same Ollama tools and API shapes. The main difference is where inference runs.<CardGroup cols={2}>- <Card title="Cloud models" icon="cloud" href="/cloud">- Run models without a local GPU.+ <Card title="Cloud" icon="cloud" href="/cloud">+ Run larger models without managing local compute, either from Ollama or through the Cloud API.</Card>- <Card title="Local models" icon="hard-drive" href="/quickstart#run-a-model-locally">- Download Ollama and run a model on your computer.+- <Card title="Local" icon="laptop" href="/local">++ <Card title="Local" icon="hard-drive" href="/local">+ Install Ollama and run models on macOS, Windows, Linux, or Docker.</Card></CardGroup>- ## What you can build+ Browse the [model library](https://ollama.com/search) for coding, vision, embeddings, and reasoning models.- Ollama supports [streaming](/guide/capabilities/streaming), [tool calling](/guide/capabilities/tool-calling), [structured outputs](/guide/capabilities/structured-outputs), [vision](/guide/capabilities/vision), [embeddings](/guide/capabilities/embeddings), [thinking](/guide/capabilities/thinking), and [web search](/guide/capabilities/web-search).++## What you can build+- ## Next steps++Ollama supports [streaming](/guide/capabilities/streaming), [tool calling](/guide/capabilities/tool-calling), [structured outputs](/guide/capabilities/structured-outputs), [decision models](/guide/capabilities/decision), [vision](/guide/capabilities/vision), [embeddings](/guide/capabilities/embeddings), [thinking](/guide/capabilities/thinking), and [web search](/guide/capabilities/web-search).+- Connect Ollama to an app, or build with the API.+ ## Documentation-- [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="Integrations" icon="plug" href="/integrations">+ Connect Ollama to an app, editor, or agent.+ </Card>++ <Card title="API reference" icon="code" href="/api/introduction">+ Compare local and cloud base URLs, then send your first request.+ </Card>++ <Card title="Browse models" icon="star" href="https://ollama.com/search">+ Find models for chat, coding, vision, embeddings, and reasoning.+ </Card>++ <Card title="Python library" icon="python" href="https://github.com/ollama/ollama-python">+ Use Ollama from Python.+ </Card>++ <Card title="JavaScript library" icon="js" href="https://github.com/ollama/ollama-js">+ Use Ollama from JavaScript or TypeScript.+ </Card>+</CardGroup>## Communitydiff --cc docs/integrations/claude-code.mdxindex 4da08b3c1,b27b8834f..ebec14975--- a/docs/integrations/claude-code.mdx+++ b/docs/integrations/claude-code.mdx@@@ -155,6 -155,23 +155,23 @@@ Claude Code prompts for permission on mSee 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.++Install Claude Code, then set your [API key](/guide/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 --cc docs/integrations/claude-desktop.mdxindex 66e109511,3bfa3b176..9c24e6911--- a/docs/integrations/claude-desktop.mdx+++ b/docs/integrations/claude-desktop.mdx@@@ -1,10 -1,39 +1,39 @@@---title: Claude Desktop+ description: Use Ollama models in Claude on macOS.---- Claude Desktop is no longer supported by `ollama launch`.- Existing installations can be restored to the usual Claude profile:+ ## Prerequisites++ - [Ollama](https://ollama.com/download/). Windows support coming soon.-- To use a local model, [download it](/quickstart#run-a-model-locally) before setup.++- To use a local model, [download it](/guide/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.++ ## Set up Claude++ 1. Open Ollama and select **Apps**.+ 2. Connect **Claude**.+ 3. Follow the setup prompts to install Claude if needed and restart it when prompted.++ ## Switch models++ Open Ollama **Settings → Apps**. Choose your models, then select **Restart Claude**. You can use the same model for more than one option.++ ## Supported features++ - **Subagents** - Split larger tasks across agents+ - **Web search** - Supported by default through [Ollama's web search](/capabilities/web-search)-- **Cowork** - Complete difficult tasks with Claude Cowork++- **Cowork** - Complete difficult tasks with Claude Cowork+ - **Auto mode** - Let the agent decide when to ask before making changes++ ## Disconnect Claude++ Open Ollama **Apps** and disconnect Claude. Ollama restores Claude's previous settings. Restart Claude when prompted.++ You can also restore Claude from the terminal:```shellollama launch claude-desktop --restorediff --cc docs/integrations/cline.mdxindex a3a93f912,075f0a1eb..3cd6663bb--- a/docs/integrations/cline.mdx+++ b/docs/integrations/cline.mdx@@@ -13,7 -13,7 +13,7 @@@ Install [Cline](https://docs.cline.bot/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](/local/context-length) for more information.</Note>-<Note>Use a [context window](/context-length) of at least 32K tokens for coding.</Note>++<Note>Use a [context window](/local/context-length) of at least 32K tokens for coding.</Note><div style={{ display: 'flex', justifyContent: 'center' }}><img