Unauthorized for url error with huggingface

anilsingh29
Fri, 11 Jul 2025 09:32:35 +0000

Keep getting this error message

File “\langchain-models\venv\Lib\site-packages\huggingface_hub\utils_http.py”, line 477, in hf_raise_for_status
raise _format(HfHubHTTPError, str(e), response) from e
huggingface_hub.errors.HfHubHTTPError: 401 Client Error: Unauthorized for url: https://api-inference.huggingface.co/models/deepseek-ai/DeepSeek-R1-0528/v1/chat/completions (Request ID: Root=1-6870d8eb-5a9733c17f893c654b51371f;0a7a931e-b853-48bd-9540-91a1fb0f9316)

Invalid username or password.