# Persistent 404 "Not Found" Error from API despite extensive troubleshooting

**URL:** <https://discuss.huggingface.co/t/persistent-404-not-found-error-from-api-despite-extensive-troubleshooting/162110>\
**Category:** Beginners\
**Created:** [July 7, 2025, 8:03pm UTC](https://discuss.huggingface.co/t/persistent-404-not-found-error-from-api-despite-extensive-troubleshooting/162110 "2025-07-07T20:03:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ai4bilal](https://avatars.discourse-cdn.com/v4/letter/a/e68b1a/32.png) [@ai4bilal](https://discuss.huggingface.co/u/ai4bilal)\
**Post date:** [July 7, 2025, 8:03pm UTC](https://discuss.huggingface.co/t/persistent-404-not-found-error-from-api-despite-extensive-troubleshooting/162110/1 "2025-07-07T20:03:51Z")

</div>

I am consistently receiving a 404 “Not Found” error when trying to make a POST request to the Inference API (e.g., for the gpt2 model).

Here is what I have already tried:

1. Used the correct PowerShell command: Invoke-WebRequest -Uri “[https://api-inference.huggingface.co/models/gpt2](https://api-inference.huggingface.co/models/gpt2)” -Method POST …
2. Generated a new API token with “write” permissions.
3. Tested the command on two completely different networks (my home Wi-Fi and my mobile data provider). The 404 error persists on both.
4. To confirm my machine and network are working, I successfully made a POST request to [https://httpbin.org/post](https://httpbin.org/post). The test was successful (200 OK).

This indicates the issue is not with my local setup but is specific to the connection to the Hugging Face API from my location/account.`

Could you please help me investigate this?

---

<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:** [July 7, 2025, 10:11pm UTC](https://discuss.huggingface.co/t/persistent-404-not-found-error-from-api-despite-extensive-troubleshooting/162110/2 "2025-07-07T22:11:05Z")

</div>

Hi @ai4bilal thanks for posting! This issue is similar to the one here: [404 to any API i tried - #6 by meganariley](https://discuss.huggingface.co/t/404-to-any-api-i-tried/161937/6).

You can request inference provider support for gpt2 on the model page: [openai-community/gpt2 · Hugging Face](https://huggingface.co/openai-community/gpt2) (Click on ‘Ask for provider support’) or use this model with [Inference Endpoints](https://huggingface.co/docs/inference-endpoints/index) instead.

To see which models are available to use with HF Inference, check out our filtered search [here](https://huggingface.co/models?inference_provider=hf-inference&sort=trending). You can also [subscribe to PRO](https://huggingface.co/subscribe/pro)! Perks include: 20x more inference usage, 8x ZeroGPU quota, 10x private storage capacity 🚀 Check out [PRO Account - Hugging Face](https://huggingface.co/pro) for details.
