# API error for model sentence-transformers/all-MiniLM-L6-v2

**URL:** <https://discuss.huggingface.co/t/api-error-for-model-sentence-transformers-all-minilm-l6-v2/168083>\
**Category:** 🤗Transformers\
**Created:** [September 3, 2025, 6:20pm UTC](https://discuss.huggingface.co/t/api-error-for-model-sentence-transformers-all-minilm-l6-v2/168083 "2025-09-03T18:20:26Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![dissentwatch](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/dissentwatch/32/53412_2.png) [@dissentwatch](https://discuss.huggingface.co/u/dissentwatch)\
**Post date:** [September 3, 2025, 6:20pm UTC](https://discuss.huggingface.co/t/api-error-for-model-sentence-transformers-all-minilm-l6-v2/168083/1 "2025-09-03T18:20:26Z")

</div>

Hello,

Starting today my app has become unusable due to a consistent error being returned from the huggingface api.

The model I’m using is sentence-transformers/all-MiniLM-L6-v2.

The error I receive for every API call is this:

An error occurred while fetching the blob

My abbreviated backend code looks like this:

> import { HfInference } from “@huggingface/inference”;
> 
> const {
> 
> ```
> text,
> 
> history,
> 
> walletAddress,
> 
> signature,
> 
> message,
> 
> token
> 
> } = req.body;
> 
> ```
> 
> const getEmbedding = async (text) =\> {
> 
> ```
> try {
> 
> const hf = new HfInference(process.env.HF_API_TOKEN);
> 
> return await hf.featureExtraction({
> 
> model: "sentence-transformers/all-MiniLM-L6-v2",
> 
> inputs: text
> 
> });
> 
> } catch (error) {
> 
> throw new Error("Embedding failed: " + (error.message || "Unknown"));
> 
> }
> 
> };
> 
> ```

Please let me know what I need to do to resolve this error. This used to work perfectly fine until today without any changes made on my end.

---

<div class="post-metadata">

**Author:** ![dissentwatch](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/dissentwatch/32/53412_2.png) [@dissentwatch](https://discuss.huggingface.co/u/dissentwatch)\
**Post date:** [September 3, 2025, 9:20pm UTC](https://discuss.huggingface.co/t/api-error-for-model-sentence-transformers-all-minilm-l6-v2/168083/2 "2025-09-03T21:20:00Z")

</div>

I’m now also seeing a 504 error with this same HF model api call in another module where I create embeddings to upsert content to my vector database, so now my upsert process has also come to a halt.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [September 3, 2025, 11:00pm UTC](https://discuss.huggingface.co/t/api-error-for-model-sentence-transformers-all-minilm-l6-v2/168083/3 "2025-09-03T23:00:37Z")

</div>

Due to [this change](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/discussions/116) ?

---

<div class="post-metadata">

**Author:** ![dissentwatch](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/dissentwatch/32/53412_2.png) [@dissentwatch](https://discuss.huggingface.co/u/dissentwatch)\
**Post date:** [September 4, 2025, 12:32am UTC](https://discuss.huggingface.co/t/api-error-for-model-sentence-transformers-all-minilm-l6-v2/168083/4 "2025-09-04T00:32:34Z")

</div>

That change appears to be from May 14 and I only started using the model in July, and without problems until today, so that doesn’t seem to be the cause.

---

<div class="post-metadata">

**Author:** ![matheus-crivellari](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/matheus-crivellari/32/53422_2.png) [@matheus-crivellari](https://discuss.huggingface.co/u/matheus-crivellari)\
**Post date:** [September 4, 2025, 12:54am UTC](https://discuss.huggingface.co/t/api-error-for-model-sentence-transformers-all-minilm-l6-v2/168083/5 "2025-09-04T00:54:00Z")

</div>

Yeah, same here I started using this model on august with the correct inference api URL but the problem started today. I’m receiving a 504 gateway timeout from the api after a 2m response delay.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [September 4, 2025, 4:59am UTC](https://discuss.huggingface.co/t/api-error-for-model-sentence-transformers-all-minilm-l6-v2/168083/6 "2025-09-04T04:59:41Z")

</div>

Hmm, it seems to be [working by the Python client](https://github.com/huggingface/huggingface_hub/issues/2494)…?

```py
from huggingface_hub import InferenceClient

HF_TOKEN = "hf_ ***my_read_token***"

client = InferenceClient(
    provider="hf-inference",
    api_key=HF_TOKEN,
)

result = client.sentence_similarity(
    "That is a happy person",
    other_sentences=[
        "That is a happy dog",
        "That is a very happy person",
        "Today is a sunny day"
    ],
    model="sentence-transformers/all-MiniLM-L6-v2",
)
print(result) # [0.6945773363113403, 0.9429150223731995, 0.25687623023986816]

```

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [September 4, 2025, 6:21am UTC](https://discuss.huggingface.co/t/api-error-for-model-sentence-transformers-all-minilm-l6-v2/168083/7 "2025-09-04T06:21:42Z")

</div>

Seems [fixed by HF Staff](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/discussions/116#68b92d40b3ea85e7fc4aa695).

---

<div class="post-metadata">

**Author:** ![dissentwatch](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/dissentwatch/32/53412_2.png) [@dissentwatch](https://discuss.huggingface.co/u/dissentwatch)\
**Post date:** [September 4, 2025, 3:22pm UTC](https://discuss.huggingface.co/t/api-error-for-model-sentence-transformers-all-minilm-l6-v2/168083/8 "2025-09-04T15:22:00Z")

</div>

It started working again briefly on my end but now all requests are back to failing again.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [September 4, 2025, 11:27pm UTC](https://discuss.huggingface.co/t/api-error-for-model-sentence-transformers-all-minilm-l6-v2/168083/9 "2025-09-04T23:27:49Z")

</div>

Seems [same here](https://discuss.huggingface.co/t/hf-inference-api-503-504-server-error/148267/3).
