const response = await genAI.models.generateContent({
model: "gemini-2.5-pro-preview-06-05",
contents: [
{
role: "user",
parts: [
{
fileData: {
fileUri: "https://www.youtube.com/watch?v=1yBHTJx6-Oc",
},
},
],
},
{
role: "user",
parts: [{ text: "Summarize the video in 10 words." }],
},
],
});
This is my error message
ClientError: got status: 400 Bad Request. {"error":{"code":400,"message":"* GenerateContentRequest.contents[0].parts: contents.parts must not be empty.\n","status":"INVALID_ARGUMENT"}}
Other urls work fine, why doesn’t this video work?
At first I thought ‘-’ was the problem, so I tried adding other videos with ‘-’ in the videoId, but there was no problem. Are there other people who are having the same problem as me?