# 400 Client Error in Inference API for sentence similarity task

**URL:** <https://discuss.huggingface.co/t/400-client-error-in-inference-api-for-sentence-similarity-task/34784>\
**Category:** Beginners\
**Created:** [March 27, 2023, 11:10am UTC](https://discuss.huggingface.co/t/400-client-error-in-inference-api-for-sentence-similarity-task/34784 "2023-03-27T11:10:35Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ananya20](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/ananya20/32/14969_2.png) [@ananya20](https://discuss.huggingface.co/u/ananya20)\
**Post date:** [March 27, 2023, 11:10am UTC](https://discuss.huggingface.co/t/400-client-error-in-inference-api-for-sentence-similarity-task/34784/1 "2023-03-27T11:10:35Z")

</div>

Getting ‘400 Client Error: Bad Request for url’ error while trying out the widgets of sentence- similarity task.

 ![image](https://us1.discourse-cdn.com/hellohellohello/original/2X/d/d20a5a52808b6edae439777731aa875f657c82ef.png)

Faced this issue while trying to use many sentence-similarity models uploaded in the last 2 months: (Mentioning the names of few models for example)  
l3cube-pune/indic-sentence-similarity-sbert  
l3cube-pune/indic-sentence-bert-nli  
l3cube-pune/hindi-sentence-bert-nli

Is this some problem with the model or it this a problem related to HF inference API?  
Any help regarding how to fix this error would be appreciated.

Thanks

---

<div class="post-metadata">

**Author:** ![bayang](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/bayang/32/15163_2.png) [@bayang](https://discuss.huggingface.co/u/bayang)\
**Post date:** [April 4, 2023, 9:43am UTC](https://discuss.huggingface.co/t/400-client-error-in-inference-api-for-sentence-similarity-task/34784/2 "2023-04-04T09:43:02Z")

</div>

@ananya20 did you find a solution?  
I’m facing the same issue.  
it is working locally, but the pushed version on HG throws the same error.

---

<div class="post-metadata">

**Author:** ![ananya20](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/ananya20/32/14969_2.png) [@ananya20](https://discuss.huggingface.co/u/ananya20)\
**Post date:** [April 5, 2023, 2:57am UTC](https://discuss.huggingface.co/t/400-client-error-in-inference-api-for-sentence-similarity-task/34784/3 "2023-04-05T02:57:49Z")

</div>

@bayang I haven’t found a solution yet. I could see this error in most sentence-similarity models pushed on Hugging Face recently. I do not think this is an issue with the model files

---

<div class="post-metadata">

**Author:** ![bayang](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/bayang/32/15163_2.png) [@bayang](https://discuss.huggingface.co/u/bayang)\
**Post date:** [April 5, 2023, 10:31am UTC](https://discuss.huggingface.co/t/400-client-error-in-inference-api-for-sentence-similarity-task/34784/4 "2023-04-05T10:31:27Z")

</div>

@ananya20 Exactly my model is working offline when I call my private model using `use_auth_token`, it works perfectly locally.  
If we were able to see and modify the code behind their free API inferencing, this could be great.

---

<div class="post-metadata">

**Author:** ![ananya20](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/ananya20/32/14969_2.png) [@ananya20](https://discuss.huggingface.co/u/ananya20)\
**Post date:** [April 28, 2023, 10:11am UTC](https://discuss.huggingface.co/t/400-client-error-in-inference-api-for-sentence-similarity-task/34784/5 "2023-04-28T10:11:51Z")

</div>

The issue seems to be resolved now. The error is gone and APIs are working well.

---

<div class="post-metadata">

**Author:** ![bayang](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/bayang/32/15163_2.png) [@bayang](https://discuss.huggingface.co/u/bayang)\
**Post date:** [April 28, 2023, 10:55am UTC](https://discuss.huggingface.co/t/400-client-error-in-inference-api-for-sentence-similarity-task/34784/6 "2023-04-28T10:55:57Z")

</div>

You are right, it is also working on my side:)

---

<div class="post-metadata">

**Author:** ![numanjvd82](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/numanjvd82/32/33389_2.png) [@numanjvd82](https://discuss.huggingface.co/u/numanjvd82)\
**Post date:** [October 24, 2024, 4:16pm UTC](https://discuss.huggingface.co/t/400-client-error-in-inference-api-for-sentence-similarity-task/34784/7 "2024-10-24T16:16:33Z")

</div>

I am using a text to image model and still getting this error on my deployed website. Anybody has an idea why?

---

<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:** [October 25, 2024, 12:41am UTC](https://discuss.huggingface.co/t/400-client-error-in-inference-api-for-sentence-similarity-task/34784/8 "2024-10-25T00:41:19Z")

</div>

The Inference API specification has changed since the summer, making it almost unusable unless the model is in **Warm** status.

> **[Supported Models](https://huggingface.co/docs/api-inference/supported-models)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.
