# 401 Error when trying to upload model from local machine

**URL:** <https://discuss.huggingface.co/t/401-error-when-trying-to-upload-model-from-local-machine/156020>\
**Category:** Beginners\
**Created:** [May 20, 2025, 11:24am UTC](https://discuss.huggingface.co/t/401-error-when-trying-to-upload-model-from-local-machine/156020 "2025-05-20T11:24:19Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [May 20, 2025, 2:11pm UTC](https://discuss.huggingface.co/t/401-error-when-trying-to-upload-model-from-local-machine/156020/2 "2025-05-20T14:11:44Z")

</div>

There doesn’t seem to be a specific issue on GitHub, so if it’s working on Colab, I think it’s a network problem. There are too many possible causes for a 401 error.

> [@401 unauthorized for create\_inference\_endpoint](https://discuss.huggingface.co/t/401-unauthorized-for-create-inference-endpoint/85038):
>
> Hello, I’m trying to create an inference endpoint with a custom docker image using the huggingface\_hub library because the web interface doesn’t allow environment variables to be set. I first log in with huggingface-cli login, then call create\_inference\_endpoint and get a 401 error, then I tried calling login() within the python script in case that would help and got an identical error, shown below. I’ve also tried creating a new access token with the same result, and upgraded huggingface\_hub …

> [@Error 401 Client Error: Unauthorized for url](https://discuss.huggingface.co/t/error-401-client-error-unauthorized-for-url/19714):
>
> When using model card of my private speech recognition model with LM, I got this error: 401 Client Error: Unauthorized for url: [https://huggingface.co/api/models/taliai/tali-asr-with-lm/revision/main](https://huggingface.co/api/models/taliai/tali-asr-with-lm/revision/main) while the same model without lm works fine. Is there anything wrong on my model or model card or … Any help is appreciated.

> **[Issues · unslothai/unsloth](https://github.com/unslothai/unsloth/issues)**
>
> Finetune Qwen3, Llama 4, TTS, DeepSeek-R1 & Gemma 3 LLMs 2x faster with 70% less memory! 🦥 - Issues · unslothai/unsloth

---

_[View the full topic](https://discuss.huggingface.co/t/401-error-when-trying-to-upload-model-from-local-machine/156020)._
