{"error":"\"all-minilm\" does not support generate"} — the Ollama API answers
this with HTTP 400 when you send a prompt to /api/generate (or
/api/chat) for a model that can only make embeddings. The model is fine; you
called the wrong endpoint. Send the text to /api/embed instead and you get a
vector back.
Embedding models such as all-minilm and nomic-embed-text turn
text into a list of numbers; they cannot write an answer. Use /api/embed with
an input field for them, and keep /api/generate and
/api/chat for chat models such as qwen2.5 or llama3.1.
The error
PS> curl.exe -s -i http://127.0.0.1:15190/api/generate -d '@gen.json' (gen.json: {"model":"all-minilm","prompt":"Why is the sky blue?","stream":false})
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
Date: Fri, 06 Nov 2026 07:15:06 GMT
Content-Length: 52
{"error":"\"all-minilm\" does not support generate"}
The chat endpoint refuses the same model with the same shape of message:
{"error":"\"all-minilm\" does not support chat"}
Why it happens
ollama show prints a Capabilities list for every model. The chat model in the
test, qwen2.5:0.5b, lists completion and tools;
all-minilm lists only embedding, no completion.
Sent to /api/generate or /api/chat, that model was refused with
HTTP 400 and its name in the message.
PS> ollama show all-minilm
Model
architecture bert
parameters 23M
context length 512
embedding length 384
quantization F16
Capabilities
embedding
...
The usual way to meet it is a RAG sample that uses one model name for both jobs, or a
configuration where the chat model and the embedding model were swapped. On the command
line Ollama 0.40.14 is more forgiving than the API: ollama run all-minilm "Why is the
sky blue?" did not fail in the test, it printed the 384 numbers of the embedding
and exited with code 0. So a script that works in the terminal can still fail the moment
the same model name goes into an HTTP call.
The fix
PS> curl.exe -s http://127.0.0.1:15190/api/embed -d '@emb.json' (emb.json: {"model":"all-minilm","input":"Why is the sky blue?"})
{"model":"all-minilm","embeddings":[[0.010121205,-0.0017384731,0.050096255,0.046960793,0.054998174,0.008553368,0.105450615,-0.025881601,0.12957646,0.031904623,- ... (cut) ... 354621]],"total_duration":9713000,"load_duration":3901200,"prompt_eval_count":8}
Two things changed: the endpoint is /api/embed, and the text goes in
input rather than prompt. input also takes an array
of strings: sent two questions in one array, the server returned two vectors. If you really wanted an answer in words,
keep /api/generate and change the model to a chat model; in an application,
keep two settings, one for the chat model and one for the embedding model, so they cannot
be mixed up.
How it was reproduced
Ollama 0.40.14 on Windows 11, with a separate server started by ollama serve
on 127.0.0.1:15190 (set through OLLAMA_HOST) and its own models
folder, so the test server and port are the test's own. all-minilm (45 MB,
embedding only) and qwen2.5:0.5b were pulled into it. The request bodies were
saved to gen.json, chat.json and emb.json and sent
with curl.exe; the generate and chat calls returned 400, the embed call
returned the vector shown above.
Frequently asked
- What does 'does not support generate' mean in Ollama?
- The model you named has no completion capability. It is an embedding model, so /api/generate and /api/chat refuse it with HTTP 400. Send the text to /api/embed instead, or pick a chat model.
- How do I get embeddings from Ollama?
- POST to /api/embed with a JSON body that has model and input, for example {"model":"all-minilm","input":"some text"}. The answer has an embeddings array; in the test, an input array of two strings returned two vectors.
- How do I check whether an Ollama model can chat or only embed?
- Run ollama show with the model name and read the Capabilities section. A chat model lists completion; an embedding model such as all-minilm lists only embedding.
More decoded errors in the Fixes category. Every Ollama endpoint, with curl and .NET, is walked through in the Ollama API post.