Error when connecting with hugging face!

Hello,

I am trying to connect Hugging Face node to my n8n workflow and I am getting the following error:

I tried several different models and keep getting different errors each time. I am running n8n locally.

What are you trying to do? Are you using the right model for the right task? What happen if you just use HTTP request node?

Hi @Rana_Benmahmoud
Have you tried using an AI agent node instead of a “basic LLM chain”? Does the same behaviour come up while using different models other than that?

I am trying to simply connect a hugging face model to my workflow so I can build upon it once it works. I am trying to figure it out how to properly connect HF using an HTTP request node as I am struggling with some errors.

I need to connect a medical-specific LLM node to perform medical image analysis. I tried linking my workflow to a model via Replit, but the image analysis takes too long. Do you have any other suggestions? I’m trying to get Hugging Face to work since there are several LLMs available that I can use.

@Rana_Benmahmoud
In your screenshots, one model is marked as not supported for text-generation , and the other is a Base model, which usually is not ideal for chat/LLM chain usage. For the Basic LLM Chain, I’d use an Instruct/Chat model compatible with text generation.

on the first screenshot I used the default model for the HF node. I did not change anything

how would I do that please? HF is not supported to be added as a model in the AI agent node or am I missing something?

The http request worked! I tried one of Google’s model, but I’d appreciate your help on how to make any HF model work!

Not possible to make any HF model work, you need to use the right model for the right job.
Since you need to do medical image analysis, you need a model that can support vision tool

For medical image analysis via HuggingFace in n8n, the HF Inference node works with vision models like Salesforce/blip-image-captioning-large or microsoft/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224 (biomedical). The key config: set the node to use the “Image Classification” or “Image-to-Text” task, pass your image as binary data using the binaryData option. Also note that free-tier HF serverless endpoints cold-start and sometimes return 503 - add a Wait node + retry logic if you see intermittent failures, since the model may just need a few seconds to load.

ALL of the models I tried did not work! I used simple chat models and all returned errors including chat-gpt

Hi, thank you for your response! However, the errors I’m seeing are for any HF models including Chat-GPT. I tried microsoft/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224 but I see no options for the configurations you mentioned (set the node to use the “Image Classification” or “Image-to-Text” task) plus I get the following error message: No Inference Provider available for model microsoft/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224. Would it be better to connect to HF using an HTPP request?

Of course, since

One more thing, did your HF account have any credits available for inference usage?

Still connecting a Hugging Face model in n8n, but facing slow responses and errors. I think it’s either the model selection or the HTTP request setup I’m using.

Can you try Qwen3.6-35B-A3B ?

no, no credit.

but the http connection was through google api not HF

can you show us how you connected HF to n8n?

I don’t seem to understand what am I doing wrong!