turns-00076.parquet:9870
f9c024c9a23960db291210d1
turn 9/13gpt-4.1-mini-2025-04-14EnglishIndia461 words
degenerate_repetitionAbsentFinal dense release
USER
url i used in postman is https://api-inference.huggingface.co/models/Salesforce/codegen-350M-multi which is correct
ASSISTANT
Thanks for confirming the URL (`https://api-inference.huggingface.co/models/Salesforce/codegen-350M-multi`) is correct.
Since you are still getting **"not found"** when calling the endpoint with that URL and a valid Authorization token, here are the reasons and next steps:
---
### 1. **The "not found" is very likely a model access issue**
- Hugging Face returns **HTTP 404 Not Found** when your API token is **not authorized to access that model**.
- The token itself may be valid for general use, but that specific model (Salesforce/codegen-350M-multi) is likely **restricted** and requires explicit access or paid subscription.
---
### 2. **How to verify model access**
- Visit the model page:
https://huggingface.co/Salesforce/codegen-350M-multi
- Check if the model requires:
- A **paid subscription** for API inference
- Or **special access**, e.g., request permission from author
- If you don't meet these requirements, requests to the inference API will give **404 Not Found**.
---
### 3. **Try a free public model to confirm your token and request**
Test the minimal setup with a **public** model, e.g., `distilgpt2` which is open to all:
- URL:
`https://api-inference.huggingface.co/models/distilgpt2`
- Headers:
```
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
```
- Body:
```json
{"inputs":"list account name"}
```
If this returns valid output, your token and request syntax are OK.
---
### 4. **What to do if you need the Salesforce/codegen-350M-multi model**
- If that model is essential, follow these steps:
- Sign in to your Hugging Face account.
- Go to your plan/subscription page and check if you have the required plan (usually an API paid plan).
- Request access permission if needed.
- Alternatively, try a smaller CodeGen model that is freely accessible, for example:
`Salesforce/codegen-350M` (without `-multi`) or other community-available variants.
---
### 5. **Summary**
| Scenario | Explanation | Action |
|------------------------------------|----------------------------------------------|----------------------------------------------------|
| 404 Not Found on `Salesforce/codegen-350M-multi` | You lack API inference access for this model | Check Hugging Face subscription & permissions |
| Works on `distilgpt2` model | API token and usage are correct | Use free model or upgrade access |
| Still 404 on free models | Token likely invalid or expired | Regenerate API token, check headers and URL |
---
### Additional debugging tip:
- When you get a 404 response in Postman, check **response headers** and **body** for any useful error messages.
- Sometimes Hugging Face adds error info in the body like:
```json
{"error":"Model not found or you do not have access to it."}
```
---
If you want, I can help you pick a working free model or assist you with writing viable Apex callout code for the free one.
---
**Let me know if you want an example request or Apex code for a free model like distilgpt2 to help unblock you!**