Gemini new image generation model API: Any luck using it with HTTP node

Describe the problem/error/question Google released an API yesterday enabling to do image edit which I need to replace the background of some product pictures.

I spent several hours yesterday finding how to access it in N8N as this end point gemini-2.0-flash-preview-image-generation which is the one listed on their site Image generation  |  Gemini API  |  Google AI for Developers doesn’t seem to work. Am I missing something? I am surely missing something but any help with that HTTP node set up (URL) would be appreciated if you managed to make it work for your project

Thanks a mill!

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Anthony_Roger

First, are you allowed to use it?

Simply go to https://ai.dev and check if the model is listed in your account or not.

If it’s not listed, it may not be available in your country.

If it is listed, then availability isn’t the issue, and you can try accessing it via the API (HTTP node)…

|### Anthony Roger [email protected]|10:05 AM (6 minutes ago)||

|
| — | — | — |
|to Anan

|

Thanks, I m in the US so I believe it is avail here.

The issue lies in the HTTP node, when I use the URL apparently it isn’t recognized. I checked ListModel and could not find it. so I find it weird that Google says it is publicly available and I don’t see it listed

I must be missing something

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.