# Help Solving 404 Errors for Non-facebook/ Models in Inference API

**URL:** <https://discuss.huggingface.co/t/help-solving-404-errors-for-non-facebook-models-in-inference-api/166467>\
**Category:** Beginners\
**Created:** [August 12, 2025, 1:35am UTC](https://discuss.huggingface.co/t/help-solving-404-errors-for-non-facebook-models-in-inference-api/166467 "2025-08-12T01:35:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![timemery](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/timemery/32/52432_2.png) [@timemery](https://discuss.huggingface.co/u/timemery)\
**Post date:** [August 12, 2025, 1:35am UTC](https://discuss.huggingface.co/t/help-solving-404-errors-for-non-facebook-models-in-inference-api/166467/1 "2025-08-12T01:35:40Z")

</div>

Hi all,

I’m new to AI and struggling with Hugging Face’s Inference API in my Flask app (Ubuntu 22.04) for a book arbitrage project. POST requests to models like google/flan-t5-large, t5-small, bert-base-uncased, and distilbert-base-uncased return 404 (“Not Found”, “X-Cache: Error from cloudfront”). But facebook/bart-large-cnn works fine (HTTP/2 200, JSON). I’m on a Pro account, tried two API keys, correct headers (curl/7.81.0, JSON or x-www-form-urlencoded), TLSv1.3, and model-specific payloads (e.g., fill-mask for bert). Am I missing something basic? Are non-facebook/ models restricted or broken in CloudFront? Any tips to get text generation working for extracting arbitrage strategies (e.g., sales rank, profit margins)?

Logs: 2025-08-10 22:21:26 ERROR app Dummy-1 : API request failed after retries. Status: 404, Response: Not Found

Curl Outputs:

- facebook/bart-large-cnn (works):  
[{“summary\_text”:“[CNN.com](http://CNN.com) will feature iReporter photos in a weekly Travel Snapshots gallery. Please submit your best shots of the U.S. for next week. Visit [CNN.com/Travel](http://CNN.com/Travel) next Wednesday for a new gallery of snapshots from across the globe. For more travel photos, visit [CNN.org/Travel.”](http://CNN.org/Travel.%E2%80%9D)}]

- distilbert-base-uncased (fails):  
(venv) root@srv934846:/var/www/agentarbitrage# sudo -u www-data curl -v -H “Authorization: Bearer hf\_jkiyCjcGRoZECTsbfWblzHkadBaHvuyqWG” -X POST -d ‘{“inputs”: “Test”}’ [https://api-inference.huggingface.co/models/distilbert-base-uncased](https://api-inference.huggingface.co/models/distilbert-base-uncased) \> distilbert-base-uncased\_output.txt

- bert-base-uncased (fill-mask, fails):  
(venv) root@srv934846:/var/www/agentarbitrage# sudo -u www-data curl -v -H “Authorization: Bearer hf\_jkiyCjcGRoZECTsbfWblzHkadBaHvuyqWG” -H “Content-Type: application/json” -X POST -d ‘{“inputs”: [“This is a test [MASK] sentence”], “parameters”: {“task”: “fill-mask”}}’ [https://api-inference.huggingface.co/models/bert-base-uncased](https://api-inference.huggingface.co/models/bert-base-uncased) \> bert-base-uncased\_output.txt

---

<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 12, 2025, 2:55am UTC](https://discuss.huggingface.co/t/help-solving-404-errors-for-non-facebook-models-in-inference-api/166467/2 "2025-08-12T02:55:31Z")

</div>

It looks like a token has been leaked, so don’t forget to disable that token…

> google/flan-t5-large

[As for flan-t5-large, it simply doesn’t seem to be deployed at the moment](https://huggingface.co/models?inference_provider=all&sort=trending&search=flan-t5-large). [Here is a list of models that are currently deployed](https://huggingface.co/models?inference_provider=all&sort=trending).
