# 401 - but my API key should be valid

**URL:** <https://discuss.huggingface.co/t/401-but-my-api-key-should-be-valid/169191>\
**Category:** Beginners\
**Created:** [October 15, 2025, 9:43pm UTC](https://discuss.huggingface.co/t/401-but-my-api-key-should-be-valid/169191 "2025-10-15T21:43:24Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![meganariley](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/meganariley/32/56966_2.png) [@meganariley](https://discuss.huggingface.co/u/meganariley)\
**Post date:** [October 16, 2025, 10:42pm UTC](https://discuss.huggingface.co/t/401-but-my-api-key-should-be-valid/169191/5 "2025-10-16T22:42:13Z")

</div>

Can you please double check that your code snippet looks like this: [zai-org/GLM-4.6 · Hugging Face](https://huggingface.co/zai-org/GLM-4.6?inference_api=true&inference_provider=auto&language=sh&client=curl)? (You can find this on the [model page](https://huggingface.co/zai-org/GLM-4.6) by clicking Deploy \> Inference Providers)

Check out our guide here as well: [Inference Providers](https://huggingface.co/docs/inference-providers/index#http--curl) .

---

_[View the full topic](https://discuss.huggingface.co/t/401-but-my-api-key-should-be-valid/169191)._
