# Need help with hugging face API endpoint. ModelError: code "400"

**URL:** <https://discuss.huggingface.co/t/need-help-with-hugging-face-api-endpoint-modelerror-code-400/75648>\
**Category:** Beginners\
**Created:** [March 3, 2024, 3:59am UTC](https://discuss.huggingface.co/t/need-help-with-hugging-face-api-endpoint-modelerror-code-400/75648 "2024-03-03T03:59:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nexusai3060](https://avatars.discourse-cdn.com/v4/letter/n/eb9ed0/32.png) [@nexusai3060](https://discuss.huggingface.co/u/nexusai3060)\
**Post date:** [March 3, 2024, 3:59am UTC](https://discuss.huggingface.co/t/need-help-with-hugging-face-api-endpoint-modelerror-code-400/75648/1 "2024-03-03T03:59:59Z")

</div>

Hi,

I’m trying to create a web app where users can generate their own images. I deployed my model on AWS SageMaker. I trained my own model through thelastben’s dreambooth and it’s currently uploaded to hugging face. Here is the link to that model: [nexusai3060/2d-scenes · Hugging Face](https://huggingface.co/nexusai3060/2d-scenes)

When I run my code to test the image generation, I keep getting an error regarding API endpoint. More specifically:  
"ModelError: An error occurred (ModelError) when calling the InvokeEndpoint operation: Received client error (400) from primary with message “{  
“code”: 400,  
“type”: “InternalServerException”,  
“message”: “\u0027NoneType\u0027 object has no attribute \u0027startswith\u0027”  
}”

I’m getting answers that it’s because my model is not compatible with StableDiffusionPipeline.from\_pretrained. So, how do I make it compatible? is there a file missing? From what I read, TheLastBen’s DreamBooth is compatible with the stable diffusion model. I used the google colab to upload the models, so it should work. If anyone knows the answer, I’d greatly appreciate it.
