In n8n, the Edit Image node throws a 404 because gemini-2.5-flash-image-preview is not supported for generateContent on API v1beta

Describe the problem/error/question

The Edit Image node in n8n fails when using Google Gemini for image editing.

What is the error message (if any)?

404 NOT_FOUND: models/gemini-2.5-flash-image-preview is not found or not supported for generateContent on API version v1beta.

Please share your workflow


Share the output returned by the last node

{

“errorMessage”: “The resource you are requesting could not be found”,
“errorDescription”: “models/gemini-2.5-flash-image-preview is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.”,
“errorDetails”: {
“rawErrorMessage”: [
“Request failed with status code 404”
],
“errorData”: {
“error”: {
“code”: 404,
“message”: “models/gemini-2.5-flash-image-preview is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.”,
“status”: “NOT_FOUND”
}
}
},
“n8nDetails”: {
“nodeName”: “Edit an image”,
“nodeType”: “@n8n/n8n-nodes-langchain.googleGemini”,
“nodeVersion”: 1,
“resource”: “image”,
“operation”: “edit”,
“itemIndex”: 0,
“time”: “16.1.2026, 19:39:30”,
“n8nVersion”: “1.122.5 (Self Hosted)”,
“binaryDataMode”: “default”,
“stackTrace”: [
“NodeOperationError: The resource you are requesting could not be found”,
" at ExecuteContext.router (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_20900c8302166d11a7199f732c8d7bf5/node_modules/@n8n/n8n-nodes-langchain/nodes/vendors/GoogleGemini/actions/router.ts:60:10)“,
" at processTicksAndRejections (node:internal/process/task_queues:105:5)”,
" at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_20900c8302166d11a7199f732c8d7bf5/node_modules/@n8n/n8n-nodes-langchain/nodes/vendors/GoogleGemini/GoogleGemini.node.ts:15:10)“,
" at WorkflowExecute.executeNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1074:8)”,
" at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1255:11)“,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1691:27”,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2307:11"
]
}
}

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): Hostinger, Ubuntu 24.04 with n8n (+100 workflows)
  • Operating system: macOS

You need to switch the model you are using to fix this to another gemini model. Try one that does not say preview.

Let me know if this works!

I

m running imagen 4.0 ultra in the generate image node and in the edit image node you can’t choose a model :confused:

try readding the node, this is how it looks for me. Also ensure your n8n instance is updated all the way

Hi! What version of n8n are you using?
Is it self-hosted or cloud?
I’m asking because I can’t change the model in the Gemini image edit node either

im on cloud and im able to change it, version 2.3.5

@Jon2 Can you update your n8n version to 2.0? This is likely the cause of your issue since your on version 1.

If you don’t know how, you can check out how to here

@Soporte_USoft Update your version most likely then.

I updated the n8n version today. The update worked and was downloaded. However, after the update, I can no longer access n8n. When I click on “Manage app,” either a tab opens with “n8n is starting up. Please wait” or a file is downloaded that cannot be opened.