[GH-ISSUE #6730] api/embed return 404 #4241

Closed
opened 2026-04-12 15:10:24 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @Maluuck on GitHub (Sep 10, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/6730

What is the issue?

Using ollama on ubuntu with Tesla V100-PCIE-32GB I tried out generating embeddings as explained in the documentation which returns the error 404 page not found.
The generate api however works and the model is correctly running also.

Code used to generate embedding:

curl http://localhost:11434/api/embed -d '{
  "model": "llama3.1",
  "input": "Why is the sky blue?"
}'

ollama logs:

[GIN] 2024/09/10 - 15:05:41 | 200 |      39.483µs |       127.0.0.1 | HEAD     "/"
[GIN] 2024/09/10 - 15:05:41 | 200 |       50.26µs |       127.0.0.1 | GET      "/api/ps"
[GIN] 2024/09/10 - 15:06:13 | 200 |  2.366449541s |       127.0.0.1 | POST     "/api/generate"
[GIN] 2024/09/10 - 15:06:19 | 200 |  306.535468ms |       127.0.0.1 | POST     "/api/generate"
[GIN] 2024/09/10 - 15:06:40 | 404 |      25.546µs |       127.0.0.1 | POST     "/api/embed"
[GIN] 2024/09/10 - 15:06:44 | 404 |      23.019µs |       127.0.0.1 | POST     "/api/embed"
[GIN] 2024/09/10 - 15:13:23 | 404 |      23.064µs |       127.0.0.1 | POST     "/api/embed"

Steps taken to fix the issue:

  1. Restarted system
  2. Reinstalled ollama

OS

Linux

GPU

Nvidia

CPU

Intel

Ollama version

0.3.3

Originally created by @Maluuck on GitHub (Sep 10, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/6730 ### What is the issue? Using ollama on ubuntu with Tesla V100-PCIE-32GB I tried out generating embeddings as explained in [the documentation](https://github.com/ollama/ollama/blob/main/docs/api.md#generate-embeddings) which returns the error 404 page not found. The generate api however works and the model is correctly running also. Code used to generate embedding: ```shell curl http://localhost:11434/api/embed -d '{ "model": "llama3.1", "input": "Why is the sky blue?" }' ``` ollama logs: ```shell [GIN] 2024/09/10 - 15:05:41 | 200 | 39.483µs | 127.0.0.1 | HEAD "/" [GIN] 2024/09/10 - 15:05:41 | 200 | 50.26µs | 127.0.0.1 | GET "/api/ps" [GIN] 2024/09/10 - 15:06:13 | 200 | 2.366449541s | 127.0.0.1 | POST "/api/generate" [GIN] 2024/09/10 - 15:06:19 | 200 | 306.535468ms | 127.0.0.1 | POST "/api/generate" [GIN] 2024/09/10 - 15:06:40 | 404 | 25.546µs | 127.0.0.1 | POST "/api/embed" [GIN] 2024/09/10 - 15:06:44 | 404 | 23.019µs | 127.0.0.1 | POST "/api/embed" [GIN] 2024/09/10 - 15:13:23 | 404 | 23.064µs | 127.0.0.1 | POST "/api/embed" ``` Steps taken to fix the issue: 1. Restarted system 2. Reinstalled ollama ### OS Linux ### GPU Nvidia ### CPU Intel ### Ollama version 0.3.3
GiteaMirror added the bug label 2026-04-12 15:10:24 -05:00
Author
Owner

@rick-github commented on GitHub (Sep 10, 2024):

/api/embed was introduced in 0.3.4, you need to upgrade if you want to use that endpoint.

<!-- gh-comment-id:2341339462 --> @rick-github commented on GitHub (Sep 10, 2024): `/api/embed` was introduced in [0.3.4](https://github.com/ollama/ollama/releases/tag/v0.3.4), you need to upgrade if you want to use that endpoint.
Author
Owner

@Maluuck commented on GitHub (Sep 10, 2024):

Thank you! That fixed the problem

<!-- gh-comment-id:2341367503 --> @Maluuck commented on GitHub (Sep 10, 2024): Thank you! That fixed the problem
Author
Owner

@COOLMSF commented on GitHub (Dec 12, 2024):

/api/embed was introduced in 0.3.4, you need to upgrade if you want to use that endpoint.

(python311) root@gptest:~/git# OLLAMA_HOST="0.0.0.0:8080" ollama  --version
ollama version is 0.4.1

I am on 0.4.1, same issue

INFO  [open_webui.apps.ollama.main] url: http://localhost:8080
404 Client Error: Not Found for url: http://localhost:8080/api/embed
ERROR [open_webui.apps.retrieval.utils] 'NoneType' object is not subscriptable
<!-- gh-comment-id:2538855501 --> @COOLMSF commented on GitHub (Dec 12, 2024): > `/api/embed` was introduced in [0.3.4](https://github.com/ollama/ollama/releases/tag/v0.3.4), you need to upgrade if you want to use that endpoint. ``` bash (python311) root@gptest:~/git# OLLAMA_HOST="0.0.0.0:8080" ollama --version ollama version is 0.4.1 ``` I am on 0.4.1, same issue ``` bash INFO [open_webui.apps.ollama.main] url: http://localhost:8080 404 Client Error: Not Found for url: http://localhost:8080/api/embed ERROR [open_webui.apps.retrieval.utils] 'NoneType' object is not subscriptable ```
Author
Owner

@rick-github commented on GitHub (Dec 12, 2024):

The application listening on port 8080 is open-webui, not ollama.

<!-- gh-comment-id:2540177301 --> @rick-github commented on GitHub (Dec 12, 2024): The application listening on port 8080 is open-webui, not ollama.
Author
Owner

@COOLMSF commented on GitHub (Dec 30, 2024):

The application listening on port 8080 is open-webui, not ollama.

thx, I'll have a check.

<!-- gh-comment-id:2565187503 --> @COOLMSF commented on GitHub (Dec 30, 2024): > The application listening on port 8080 is open-webui, not ollama. thx, I'll have a check.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#4241