# Serverless Inference API always returns 404, even for public models

**URL:** <https://discuss.huggingface.co/t/serverless-inference-api-always-returns-404-even-for-public-models/166845>\
**Category:** Beginners\
**Created:** [August 14, 2025, 10:17pm UTC](https://discuss.huggingface.co/t/serverless-inference-api-always-returns-404-even-for-public-models/166845 "2025-08-14T22:17:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SeyahMind](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/seyahmind/32/52615_2.png) [@SeyahMind](https://discuss.huggingface.co/u/SeyahMind)\
**Post date:** [August 14, 2025, 10:17pm UTC](https://discuss.huggingface.co/t/serverless-inference-api-always-returns-404-even-for-public-models/166845/1 "2025-08-14T22:17:30Z")

</div>

Hi everyone,

I’m trying to use the Hugging Face Serverless Inference API, but all calls return HTTP 404 — even for small public models like `distilgpt2`.  
Endpoint: `https://api-inference.huggingface.co/models/distilgpt2`  
Token: Fine-grained token with Read and Make calls to Inference Providers enabled  
Tested on both home Wi-Fi and mobile hotspot (same result)  
Tried with PowerShell, Python `requests`, and `Invoke-RestMethod` — always 404  
Works fine when running the model locally via `transformers`

Does anyone know why this might be happening or if something is wrong with my account setup?

---

<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 14, 2025, 11:42pm UTC](https://discuss.huggingface.co/t/serverless-inference-api-always-returns-404-even-for-public-models/166845/2 "2025-08-14T23:42:16Z")

</div>

[The specifications, such as the URL of the endpoint, have changed significantly](https://discuss.huggingface.co/t/hf-agents-course-404-client-error-not-found-for-url/162747), so if you are using the URL directly, you will need to rebuild it based on the new information. If you are using it from a library, it is recommended that you update the library to the latest version.
