Google Gemini Video Node Returning 400 Bad Request

Hey everyone , i’m having a weird problem with my Google Gemini in n8n . i"m trying to generate a video , but the node keeps failing with a 400 Bad Request .

The workflow executes up to that node , but Gemini rejects the request. i’ve checked the prompt and the credentials , and they seem fine.
please what is going on?

Hey @Chuks_Saint, while you wait for a response, here are some things that might help:

Suggested resources

Automatically matched to your question.

Docs:

Forum:

@Haian_Abou-Karam - you’ve helped with similar issues before, can you take a look?

Automatically suggested by n8n’s community bot. It’s a pilot - please share feedback here.

Hey! Yeah, a 400 Bad Request from the Gemini node usually means the request is reaching Google successfully, but something about the parameters or payload isn’t compatible with the operation/model.

Since you’re generating a video, I’d first check:

The Gemini model selected in the node
Whether the model actually supports the video operation you’re using
Any optional parameters being passed to the API
Whether binary data is being sent along with the prompt
The MIME type of any binary input
Whether an expression is resolving to an unexpected value

If you’re using a newer or preview Gemini model, I’d also check the model’s currently supported parameters because n8n’s node options and Google’s API capabilities don’t always line up perfectly when APIs change.

Can you send a screenshot of the Gemini node configuration and the complete error output? That’ll make it much easier to see exactly what the API is rejecting.

please that the screen shot

Ah, okay the screenshot makes the problem much clearer.

The important part is this:

InvalidArgument: contents[0].parts[0].inlineData: MIME type video/mp4 is not supported for this operation.

So this isn’t really an authentication problem or a generic n8n failure.

Your request is reaching Gemini, but the request contains binary video data with video/mp4, and the particular operation/model combination isn’t accepting that media input in the way the node is sending it.

I can also see that the node has a Binary data section configured, with the binary property set to video.

What I’d check

  1. Check the binary property

Make sure the previous node is actually producing the binary property you’re referencing.

For example, if the previous node outputs:

binary
data

but your Gemini node is configured for:

video

then you’re referencing the wrong binary property.

  1. Check whether you actually need to send the video

If your intention is simply:

“Generate a new video from this text prompt”

then you probably don’t need to attach an existing MP4 to the request at all.

Your prompt is already being passed through:

{{ $json.output }}

So I’d temporarily remove/disable the binary input and test the generation with only the text prompt.

  1. Check the model’s supported input

The error specifically points toward a model capability / MIME-type mismatch.

That means you shouldn’t assume that because Gemini supports video somewhere in its API, every Gemini video operation accepts an MP4 as inlineData.

The exact model and operation matter.

So the video/mp4 part is actually the important clue?

Exactly.

The HTTP 400 is just the symtom. The useful part is the detailed Google error:

contents[0].parts[0].inlineData
MIME type video/mp4 is not supported

That tells us the request structure got far enought for Google’s Api to inspect the media payload , but the media isn’t valid for that particular operation.

i’d start by removing the binary video input and runing the node with the prompt alone.

if that works , you’ve isolated the problem to the binary/media configuration rather than your promp or credentials .

Also don’t radomly chnage several parameters at once. Change one thing, execute the node , and compare the resulting error. That’s much easier to troubleshoot in n8n

thank you i was also just thinking about that