# Inference API or Authentication

**URL:** <https://discuss.huggingface.co/t/inference-api-or-authentication/169319>\
**Category:** Beginners\
**Created:** [October 21, 2025, 9:57am UTC](https://discuss.huggingface.co/t/inference-api-or-authentication/169319 "2025-10-21T09:57:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mathew001](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@Mathew001](https://discuss.huggingface.co/u/Mathew001)\
**Post date:** [October 21, 2025, 9:57am UTC](https://discuss.huggingface.co/t/inference-api-or-authentication/169319/1 "2025-10-21T09:57:57Z")

</div>

Use a clear, descriptive title like: `Persistent "404 Not Found" Error on Public Inference API with Valid Fine-Grained Token`

Hello Hugging Face Team and Community,

I am having a persistent issue accessing the public Serverless Inference API, as I consistently receive a **`404 Not Found`** error for all models I try. I suspect this is an account-level restriction, as I have exhausted all local troubleshooting steps.

My Hugging Face Username is: **`Mathew001`**

**Summary of the Problem:** All POST requests to `https://api-inference.huggingface.co/models/<MODEL_ID>` return the `404 Not Found` error.

**Key Troubleshooting Steps Confirmed (Code is NOT the issue):**

1. **Correct API/Model:** The error occurs on reliably public models, including **`gpt2`** and **`google/flan-t5-small`**.

2. **Correct Tool & Syntax:** I am using PowerShell’s native `Invoke-RestMethod` (`irm`), which is correctly configured for the POST request, headers, and JSON body.

3. **Token Type Confirmed:** I am using a **Fine-Grained User Access Token**.

4. **Permissions Confirmed:** The token has the explicit permission **`Inference > Make calls to Inference Providers`** checked.

5. **Authorization Format:** The header is correctly formatted as `'Authorization': 'Bearer hf_...'`.

**Example Request:** (Note: The request below is what fails, but I have verified the syntax is correct in PowerShell.)

```auto
$url = 'https://api-inference.huggingface.co/models/gpt2'
$token = 'hf_...' # Secure token used
# ... other variables defined correctly ...
irm -Uri $url -Method Post -Headers $headers -Body $body
# Output: irm : Not Found

```

Given that I have verified the code, endpoint, and token permissions multiple times, I believe there may be an underlying issue with my account’s ability to access the service.

Could someone please check the status or permissions associated with my user ID, **`Mathew001`** , regarding access to the public Inference Providers?

Thank you for your help!

Best regards, Mathew Oloyede

---

<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:** [October 21, 2025, 10:19am UTC](https://discuss.huggingface.co/t/inference-api-or-authentication/169319/2 "2025-10-21T10:19:33Z")

</div>

Maybe similar to [this case](https://discuss.huggingface.co/t/consistent-404-not-found-on-inference-api-for-all-models/168893/2)?
