# API Key giving 404 Not Found error on all Inference API models Message:

**URL:** <https://discuss.huggingface.co/t/api-key-giving-404-not-found-error-on-all-inference-api-models-message/161893>\
**Category:** Beginners\
**Created:** [July 5, 2025, 9:45pm UTC](https://discuss.huggingface.co/t/api-key-giving-404-not-found-error-on-all-inference-api-models-message/161893 "2025-07-05T21:45:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Imsilverdevil](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/imsilverdevil/32/50658_2.png) [@Imsilverdevil](https://discuss.huggingface.co/u/Imsilverdevil)\
**Post date:** [July 5, 2025, 9:45pm UTC](https://discuss.huggingface.co/t/api-key-giving-404-not-found-error-on-all-inference-api-models-message/161893/1 "2025-07-05T21:45:42Z")

</div>

Hello,

I am trying to use the Inference API for a personal project. My username is lmsilverdevil.

I have generated multiple Access Tokens, including tokens with both ‘read’ and ‘write’ roles.

However, every time I make a request to any model (even basic models like distilgpt2), I consistently get a 404 “Not Found” error.

I have double-checked everything:

My API key is correct.

The code is making a standard POST request.

The URL [https://api-inference.huggingface.co/models/distilgpt2](https://api-inference.huggingface.co/models/distilgpt2) is correct.

It seems like there might be an issue or restriction with my account’s ability to use the Inference API. Could you please check if there is any problem on your end?

Thank you for your help.

---

<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:** [July 6, 2025, 3:11am UTC](https://discuss.huggingface.co/t/api-key-giving-404-not-found-error-on-all-inference-api-models-message/161893/2 "2025-07-06T03:11:49Z")

</div>

Currently, no text-to-text models are deployed in HF-Inference, so it does not work…

> [@Are InferenceClient()'s down?](https://discuss.huggingface.co/t/are-inferenceclient-s-down/161485/11):
>
> [Almost official news from HF DevRel on Discord](https://discord.com/channels/879548962464493619/1389836118471606364/1390065704723546177) yes! these models were sunset as part of us closing down hugging.chat unfortunately however there’s quite a lot of models that you can use through our inference providers as a replacement
