# Inference API or Authentication

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Finference-api-or-authentication%2F169319%3E%5C
**Category:** Beginners\
**Created:** [October 21, 2025, 9:57am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Finference-api-or-authentication%2F169319 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FMathew001)%5C
**Post date:** [October 21, 2025, 9:57am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Finference-api-or-authentication%2F169319%2F1 "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 `/static-proxy?url=https%3A%2F%2Fapi-inference.huggingface.co%2Fmodels%2F%3CMODEL_ID%3E%60 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 = '/static-proxy?url=https%3A%2F%2Fapi-inference.huggingface.co%2Fmodels%2Fgpt2'
$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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [October 21, 2025, 10:19am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Finference-api-or-authentication%2F169319%2F2 "2025-10-21T10:19:33Z")

</div>

Maybe similar to [this case](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fconsistent-404-not-found-on-inference-api-for-all-models%2F168893%2F2)%3F
