Platform: node with typescript (in an azure function)
Package version: 2.13.0
I am trying to call the new omni flash preview model but am getting a 400 error returned if I include the duration argument in the response format.
"400 Invalid input at 'response_format'."
An example of the code I've written
const ai = new GoogleGenAI({
vertexai: true,
project: projectId,
location: location,
googleAuthOptions: authOptions,
httpOptions: { headers: { 'Api-Revision': '2026-05-20' } },
})
const interaction = await ai.interactions.create({
model: 'gemini-omni-flash-preview',
input: [
{
type: 'user_input',
content: [
{ type: 'text', text: "a propellor plane flying along a river, under bridges, with a city scape in the background" }
]
}
],
generation_config: {
video_config: {
task: 'text_to_video'
}
},
response_format: {
type: 'video',
aspect_ratio: '16:9',
duration: 6
}
});
If I comment out duration it works fine, I have also tried including it as a string (which is what the package says it should be) and as a number, but get the same outcome
Platform: node with typescript (in an azure function)
Package version: 2.13.0
I am trying to call the new omni flash preview model but am getting a 400 error returned if I include the duration argument in the response format.
"400 Invalid input at 'response_format'."An example of the code I've written
If I comment out duration it works fine, I have also tried including it as a string (which is what the package says it should be) and as a number, but get the same outcome