Gemini Omni 1.2 Flash from Google is now available on AI Gateway. Generate videos from text prompts with one API key and no separate Google account. Gemini Omni 1.2 Flash generates 3–15 second videos with native audio and edits 3–15 second source clips with up to six reference images. Extend videos by 3–10 seconds per call, up to 30 seconds total, or refine generated clips in follow-up calls using previousInteractionId. Output supports 360p, 720p, 1080p, and 4K in 16:9 or 9:16. Use generateText or streamText in AI SDK to receive the generated video as a file. Copy link to headingGenerate a video Use google/gemini-omni-1.2-flash as the model name. This example generates a three-second, 360p clip and saves it as video.mp4: import { writeFile } from 'node:fs/promises';import { generateText } from 'ai'; const { files } = await generateText({ model: 'google/gemini-omni-1.2-flash', prompt: 'A red ball rolls across a white table.', providerOptions: { google: { responseModalities: ['text', 'video'], responseFormat: [ { type: 'video', resolution: '360p', duration: '3s' }, ], }, },}); const video = files.find(file => file.mediaType === 'video/mp4');if (!video) throw new Error('No MP4 video returned'); await writeFile('video.mp4', video.uint8Array); Copy link to headingReceive video in a streaming response With streamText, read fullStream to handle generated files as they arrive. The video is delivered as a completed file: import { writeFile } from 'node:fs/promises';import { streamText } from 'ai'; const result = streamText({ model: 'google/gemini-omni-1.2-flash', prompt: 'A red ball rolls across a white table.', providerOptions: { google: { responseModalities: ['text', 'video'], responseFormat: [ { type: 'video', resolution: '360p', duration: '3s' }, ], }, },}); for await (const part of result.fullStream) { if (part.type === 'file' && part.file.mediaType === 'video/mp4') { await writeFile('video.mp4', part.file.uint8Array); } else if (part.type === 'error') { throw part.error; }} AI Gateway provides a unified API for calling models, tracking usage and cost, and configuring retries, failover, and performance optimizations for higher-than-provider uptime. It includes built-in custom reporting, Zero Data Retention support, budgets for API keys, routing rules, and more. AI Gateway reflects provider pricing with no markup and does not charge a platform fee on inference, including on Bring Your Own Key (BYOK) requests. Explore more models in the AI Gateway model catalog.
AI NEWS JOURNAL
VercelAI NEWS / JOURNAL
Gemini Omni 1.2 Flash now available on AI Gateway
Google's Gemini Omni 1.2 Flash is now accessible via AI Gateway, enabling users to generate 3–15 second videos from text prompts using a single API key without needing a separate Google account. The model supports video generation with native audio, editing clips using up to six reference images, extending videos by 3–10 seconds per call (up to 30 seconds total), and refining outputs via previousInteractionId. Output resolutions include 360p, 720p, 1080p, and 4K in 16:9 or 9:16 aspect ratios. Videos can be retrieved via generateText or streamText in the AI SDK as MP4 files. AI Gateway offers unified API access, usage tracking, cost monitoring, retry configurations, failover, performance optimization, custom reporting, Zero Data Retention, budget controls, and routing rules, reflecting provider pricing with no markup or platform fees, including for BYOK requests.
翻訳サービスが停止中のため原文を表示しています。