/api/embeddings returning 404 #4116

Closed
opened 2025-11-12 12:07:39 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @jwstanwick on GitHub (Aug 27, 2024).

What is the issue?

I am on an M3 Mac. I am running Ollama using the installer, not on docker. When running curl localhost:11434/api/embeddings, Ollama returns 404 page not found. Other api calls such as pull and show work as intended. The output from my Ollama logs is as follows:

[GIN] 2024/08/27 - 17:57:12 | 404 |      24.875µs |       127.0.0.1 | GET      "/api/embeddings"
[GIN] 2024/08/27 - 17:57:21 | 404 |      19.875µs |       127.0.0.1 | GET      "/api/embeddings"
[GIN] 2024/08/27 - 17:57:32 | 404 |      18.958µs |       127.0.0.1 | GET      "/api/embeddings"

I have tried restarting Ollama, restarting my pc, and the other normal "turn it off and on again" checks. I am completely stumped! Any help is appreciated.

OS

macOS

GPU

Apple

CPU

Apple

Ollama version

0.3.7

Originally created by @jwstanwick on GitHub (Aug 27, 2024). ### What is the issue? I am on an M3 Mac. I am running Ollama using the installer, not on docker. When running `curl localhost:11434/api/embeddings`, Ollama returns `404 page not found`. Other api calls such as `pull` and `show` work as intended. The output from my Ollama logs is as follows: ``` [GIN] 2024/08/27 - 17:57:12 | 404 | 24.875µs | 127.0.0.1 | GET "/api/embeddings" [GIN] 2024/08/27 - 17:57:21 | 404 | 19.875µs | 127.0.0.1 | GET "/api/embeddings" [GIN] 2024/08/27 - 17:57:32 | 404 | 18.958µs | 127.0.0.1 | GET "/api/embeddings" ``` I have tried restarting Ollama, restarting my pc, and the other normal "turn it off and on again" checks. I am completely stumped! Any help is appreciated. ### OS macOS ### GPU Apple ### CPU Apple ### Ollama version 0.3.7
GiteaMirror added the bug label 2025-11-12 12:07:39 -06:00
Author
Owner

@rick-github commented on GitHub (Aug 27, 2024):

/api/embeddings is a POST endpoint.

$ curl -s -X POST localhost:11434/api/embeddings | jq
{
  "error": "missing request body"
}
@rick-github commented on GitHub (Aug 27, 2024): /api/embeddings is a `POST` endpoint. ``` $ curl -s -X POST localhost:11434/api/embeddings | jq { "error": "missing request body" } ```
Author
Owner

@pdevine commented on GitHub (Aug 28, 2024):

@jwstanwick Also note that the POST /api/embeddings endpoint is deprecated and you should use POST /api/embed instead. Here are the docs for the endpoint.

@pdevine commented on GitHub (Aug 28, 2024): @jwstanwick Also note that the `POST /api/embeddings` endpoint is deprecated and you should use `POST /api/embed` instead. Here are the [docs for the endpoint](https://github.com/ollama/ollama/blob/main/docs/api.md#generate-embeddings).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama-ollama#4116