# API returning 404 Not Found for Text Models, but Image Models work

**URL:** <https://discuss.huggingface.co/t/api-returning-404-not-found-for-text-models-but-image-models-work/163980>\
**Category:** Models\
**Created:** [July 21, 2025, 5:10pm UTC](https://discuss.huggingface.co/t/api-returning-404-not-found-for-text-models-but-image-models-work/163980 "2025-07-21T17:10:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kelvindovasco](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/kelvindovasco/32/51475_2.png) [@Kelvindovasco](https://discuss.huggingface.co/u/Kelvindovasco)\
**Post date:** [July 21, 2025, 5:10pm UTC](https://discuss.huggingface.co/t/api-returning-404-not-found-for-text-models-but-image-models-work/163980/1 "2025-07-21T17:10:22Z")

</div>

Hello,

I am having an issue with the Inference API. I can successfully get a 200 OK response and generate images using the “stabilityai/stable-diffusion-xl-base-1.0” model.

However, any text-generation model I try results in a 404 Not Found error. I have tried “mistralai/Mistral-7B-Instruct-v0.2” and even “distilgpt2”.

- I have tried with Python requests and also with PowerShell’s Invoke-RestMethod.
- I have confirmed my API token is correct, as it works for the image generation model.
- I even created a brand new account and a new token, and the problem persists.

It seems I can only access image models, while text models are unavailable from my location, always returning a 404 error. Can anyone help diagnose this?

Thank you.

---

<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:** [July 22, 2025, 1:12am UTC](https://discuss.huggingface.co/t/api-returning-404-not-found-for-text-models-but-image-models-work/163980/2 "2025-07-22T01:12:34Z")

</div>

[The lineup of deployed models and, in some cases, the API endpoint URLs have changed](https://discuss.huggingface.co/t/are-inferenceclient-s-down/161485), so that may be the reason.

[Text-Generation-related models currently deployed](https://huggingface.co/models?pipeline_tag=text-generation&inference_provider=all&sort=trending).
