{"error":"This server does not support embeddings. Start it with `--embeddings`"} with HTTP 501 from Ollama's /api/embed means the model in the request is a chat model, not an embedding model. Do not look for an --embeddings flag: ollama serve --embeddings answers unknown flag. Send the request to an embedding model such as all-minilm instead.

To see which kind a model is, ask /api/show for it and read capabilities: the test's chat model listed "completion","tools", the embedding model "embedding".

The error

The body file emb-chat.json, then the request:

{"model":"qwen2.5:0.5b","input":"A short sentence to embed."}
PS> curl.exe -s -i -d "@emb-chat.json" http://127.0.0.1:15191/api/embed
HTTP/1.1 501 Not Implemented
Content-Type: application/json; charset=utf-8
Date: Tue, 10 Nov 2026 03:28:33 GMT
Content-Length: 81

{"error":"This server does not support embeddings. Start it with `--embeddings`"}

qwen3:0.6b gave the same 501 and message. The OpenAI-compatible route answered the same way, wrapped in its own error shape:

PS> curl.exe -s -i -d "@emb-chat.json" http://127.0.0.1:15191/v1/embeddings
HTTP/1.1 501 Not Implemented
...
{"error":{"message":"This server does not support embeddings. Start it with `--embeddings`","type":"api_error","param":null,"code":null}}

Why it happens

The message names a start-up option, but on this setup it is not an option of ollama serve:

PS> ollama serve --embeddings
Error: unknown flag: --embeddings

What changed the answer in the test was the model. qwen2.5:0.5b listed "capabilities":["completion","tools"] and gave the 501; all-minilm listed "capabilities":["embedding"] and returned vectors from the same server, which was not restarted between the requests.

PS> curl.exe -s http://127.0.0.1:15191/api/show -d "@show-q.json"
...
"capabilities":["completion","tools"]
PS> curl.exe -s http://127.0.0.1:15191/api/show -d "@show-m.json"
...
"capabilities":["embedding"]

The bodies were {"model":"qwen2.5:0.5b"} and {"model":"all-minilm"}; the replies are filtered to the capabilities array.

The fix

{"model":"all-minilm","input":"A short sentence to embed."}
PS> curl.exe -s -i -d "@emb-ok.json" http://127.0.0.1:15191/api/embed
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
...
{"model":"all-minilm","embeddings":[[0.0059903543,0.093832396,0.06988208,0.06057726,...

Use a model whose capabilities include embedding for /api/embed and /v1/embeddings, and keep the chat model for /api/chat and /api/generate. If your application reads one model name from configuration for both jobs, give it two settings, one for the chat model and one for the embedding model, so the embedding calls stop going to the chat model. The reverse mistake, a chat request to all-minilm, gave a clearer answer on /v1/chat/completions: 400 with "all-minilm" does not support chat.

How it was reproduced

Ollama 0.40.14 (ollama --version) on Windows 11, run as a separate ollama serve on 127.0.0.1:15191 with its own models folder holding qwen2.5:0.5b, qwen3:0.6b and all-minilm. Requests went through curl.exe from Windows PowerShell 5.1 with ASCII body files, all within half a minute against the same running server. The ollama serve --embeddings line exited at once with the error shown.

Frequently asked

Why does Ollama say This server does not support embeddings. Start it with --embeddings?
In the test the request named a chat model (qwen2.5:0.5b) on /api/embed. The same server returned embeddings for all-minilm, an embedding model, with no restart and no flag.
Does ollama serve have an --embeddings flag?
Not in Ollama 0.40.14: ollama serve --embeddings printed Error: unknown flag: --embeddings. Change the model in the request instead.
How do I know if an Ollama model supports embeddings?
POST the model name to /api/show and read the capabilities array. all-minilm listed embedding; qwen2.5:0.5b listed completion and tools.

More decoded errors in the Fixes category. For the opposite case, a generate or chat request sent to an embedding model, see 'does not support generate'.