Video content supplied *inline* causes server fault

The API as it will be mostly used (via File API) works fine for video.
I tried inline video, the JSON structure of the generateContent request is then


{
    "contents": [
        {
            "parts": [
                {
                    "text": "How was the video made? Describe what is shown."
                },
                {
                    "inline_data": {
                        "mimeType": "video/mp4",
                        "data": "AAAAHGZ0eXBNNFYgAAAAAWl (long sequence)

That produces a reliable HTTP status 500 server response. The request is only 16 MB, the HTTP protocol isn’t the barrier.

Inline data works for images, and nothing I could find in the documentation states that video is second-class media compared to images, therefore applied bug tag. Either the documentation should specify that video isn’t allowed inline, or (preferably) the server should accept video clips of reasonable duration supplied inline.

4 Likes

I’m having the same problem. I’d be interested to know from Google if this is just a bug that they expect to be resolved soon or if, instead, this use of the API is not supported. Thanks!

I should mention that I’ve also tried splitting the text prompt and the image into multiple Content objects. The same error results.

I’m using https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-pro-latest:generateContent.