Skip to content

Gemini Omni Flash: chat model से वीडियो

Omni chat/completions पर text और media लेता है और response में media बना सकता है। इसके parameters asynchronous Media API से अलग हैं।

  • Messages में supported image, GIF, audio या video URL हो सकते हैं।
  • OpenAI-compatible messages और पूरा Omni model ID रखें।
  • यह सुविधा Studio और Telegram bot में भी उपलब्ध है।

पूरे उदाहरण

मूल गाइड के सभी चलने योग्य उदाहरण नीचे सुरक्षित रखे गए हैं। केवल अपने टूल और ऑपरेटिंग सिस्टम से संबंधित ब्लॉक चलाएँ।

bash
curl https://nordrouter.com/v1/chat/completions \
  -H "Authorization: Bearer sk-nr-YOUR-KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/gemini-omni-flash-preview",
    "messages": [{"role": "user", "content": "Generate a video: a red balloon floating over a calm sea"}],
    "modalities": ["image", "text"],
    "max_tokens": 4000
  }'
json
{
  "model": "google/gemini-omni-flash-preview",
  "messages": [{
    "role": "user",
    "content": [
      { "type": "text", "text": "Create an ad: use the person from the photo, motion from the reference video, and cut to the audio beat" },
      { "type": "image_url", "image_url": { "url": "https://example.com/hero.png" } },
      { "type": "image_url", "image_url": { "url": "https://example.com/style.gif" } },
      { "type": "input_audio", "input_audio": { "data": "BASE64_AUDIO", "format": "wav" } },
      { "type": "video_url", "video_url": { "url": "https://example.com/motion.mp4" } }
    ]
  }],
  "modalities": ["image", "text"],
  "max_tokens": 4000
}
json
{
  "choices": [{
    "message": {
      "role": "assistant",
      "content": "I've generated the video for you.",
      "videos": [{ "type": "video_url",
                   "video_url": { "url": "https://nordrouter.com/media/file/…" } }]
    }
  }],
  "usage": { "prompt_tokens": 18, "completion_tokens": 58197, "total_tokens": 58215 }
}

आधिकारिक दस्तावेज़ और लिंक

Omni FlashRegular video models (/media/generate)
EndpointPOST /v1/chat/completionsPOST /media/generate
Billingper token (input $0.2322 / output $1.3932 per 1M)flat per generation
Speed~40–60 s, synchronous responsetask + polling
Video price≈ $0.08from $0.11

संबंधित गाइड

पहले न्यूनतम text request से कनेक्शन जाँचें, फिर streaming, tool calls, images और दूसरी advanced सुविधाएँ जोड़ें। API key को public code या browser frontend में कभी न रखें।

समस्या निवारण