# Error 401 Client Error: Unauthorized for url

**URL:** <https://discuss.huggingface.co/t/error-401-client-error-unauthorized-for-url/19714>\
**Category:** 🤗Hub\
**Created:** [June 28, 2022, 8:17am UTC](https://discuss.huggingface.co/t/error-401-client-error-unauthorized-for-url/19714 "2022-06-28T08:17:42Z")\
**Posts on this page:** 1\
**Showing post:** 79

<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:** [August 5, 2025, 12:37am UTC](https://discuss.huggingface.co/t/error-401-client-error-unauthorized-for-url/19714/79 "2025-08-05T00:37:23Z")

</div>

> [https://api-inference.huggingface.co/models/HuggingFaceH4/zephyr-7b-beta/v1/chat/completions](https://api-inference.huggingface.co/models/HuggingFaceH4/zephyr-7b-beta/v1/chat/completions)

I think [this format’s endpoint is either old or has been retained for compatibility reasons](https://discuss.huggingface.co/t/hf-agents-course-404-client-error-not-found-for-url/162747). Let’s change it to [the new implementation](https://huggingface.co/docs/inference-providers/en/guides/first-api-call).

---

_[View the full topic](https://discuss.huggingface.co/t/error-401-client-error-unauthorized-for-url/19714)._
