Serverless Inference API always returns 404, even for public models

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?

1 Like

The specifications, such as the URL of the endpoint, have changed significantly, 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.