I am having an issue. When I upload an image file via telegram and want to send it to Openrouter’s google/gemini-2.5-flash model for analysis. It seems the “Telegram get file” node functions correctly, as I use “Edit field” to remove extra hidden ‘/n’. Also “Edit node” works fine.
However, when I use this value (which is from Edit node) as an input to “Http node”, it directly connects to “Openrouter”. I have also set the Send body as a JSON. The model constantly gives me an error (Bad request).
Here is the JSON data I used.
{
“model”: “google/gemini-2.5-flash”,
“messages”: [
{
“role”: “user”,
“content”: [
{
“type”: “text”,
“text”: “Please analyze this JPG image in detail, pointing out the construction progress and potential safety hazards.”
},
{
“type”: “image_url”,
“image_url”: {
“url”: “data:image/jpeg;base64,{{ $json.base64String }}”
}
}
]
}
]
}
Information on your n8n setup
-
n8n version: n8n Version 2.2.6
-
Operating system: On 3rd party cloud




