AIDevKit - AI Suite for Unity
API ReferencesDiscordGlitch9
  • Introduction
    • AI Dev Kit 3.7.0
    • Troubleshooting
    • FAQ
    • Update Logs
      • AI Dev Kit v2
      • AI Dev Kit v1
  • Quick Start
    • API Key Setup
      • OpenAI
      • Google Gemini
      • ElevenLabs
      • OpenRouter
    • Adding Models & Voices
      • Quick Add Guide
      • Creating Snippets
    • Self-Hosting with Ollama
  • Editor Tools
    • Editor Chat
    • Asset Generators
    • Asset Managers
      • Prompt History
      • File Manager
      • Chatbot Manager
      • Assistant Manager
  • GEN Tasks
    • Overview
      • Prefixes
      • Sequence
    • Response
    • Image
    • Video
    • SoundFX
    • Speech
    • Transcript
    • Voice Change
    • Audio Isolation
  • Components
    • Chatbot
    • Chatbot (Assistants API)
    • Realtime Assistant
    • Modules
    • Event Receivers
  • Platform API
    • OpenAI
      • đź’¬Chat completions
      • 🖼️Image operations
      • 🗣️Text to speech
      • 🎙️Speech to text
        • Recording real-time in Unity
      • đź’ľFiles
      • 🔎Embeddings
      • 🛡️Moderations
      • ⚙️Fine-tuning
      • Assistants API
        • How it works
        • Creating custom functions
        • Creating assistants API
    • Google Gemini
      • 📝System instructions
      • đź’¬Text generation
      • ⚙️Fine-tuning
      • ▶️Fucntion calling
      • 🔎Embeddings
      • 🛡️Safety
      • đź’»Code execution
  • Legacy Documents
    • AI Dev Kit 1.0
      • Preperation
      • Scriptable Toolkits
        • Chat Streamer
        • Image Generator
        • Voice Transcriber
        • Voice Generator
      • Editor Tools
      • Troubleshooting (Legacy)
        • âť—Build Error: The name 'UnityMenu' does not exist in the current context
        • âť—The type or namespace name 'AndroidJavaObject' could not be found
        • âť—The type or namaspace name 'Plastic' does not exist
        • âť—Build Error: The name 'Asset Database' does not exist in the current context
        • âť—'ModelData.Create(Provider, string, UnixTime?, string)': not all code paths return a value
      • Code Generators
        • C# Script Generator
        • Unity Component Generator
    • AI Dev Kit 2.0
      • Event Handlers
      • Editor Chat
      • Editor Vision (TTI, ITI)
      • Editor Speech (TTS)
      • Management Tools
        • Prompt History Viewer
        • AI Model Manager
        • TTS Voice Manager
        • OpenAI File Manager
        • OpenAI Assistant Manager
        • ElevenLabs Voice Library
Powered by GitBook
On this page
  1. GEN Tasks

Video

Generate a video using a diffusion transformer model

PreviousImageNextSoundFX

Last updated 5 days ago

returns

This task generates a short video clip from a text prompt or image, using models such as Veo (currently the only supported model).

The result is returned as a RawFile, pointing to the generated video file.

Unity Limitation: VideoClip Cannot Be Created at Runtime

Unity does not support creation of a VideoClip at runtime.

This means you cannot dynamically generate a VideoClip in memory using code (e.g., ScriptableObject.CreateInstance<VideoClip>()). Instead, videos must be handled as files—either streamed or played using VideoPlayer.url.

Generating a Video

// Generate from Text Prompt
RawFile videoFile = await "A cat surfing a wave"
    .GENVideo() 
    .ExecuteAsync();

// Generate from Image
Texture2D myImage = MyImage;
RawFile videoFileFromImage = await myImage
    .GENVideo() 
    .ExecuteAsync();

Results are saved to a temporary location unless you call .SetOutputPath().

GeneratedVideo