Sora 2 video generation pipe function for Open WebUI.
Set the OPENAI_API_KEY valve. Generated video duration should be one of 4, 8, and 12 seconds by specifying DURATION valve.
Models are shown in the models section of admin settings. Enable these models as public.
Choose your favorite model from "Sora 2 Landscape", "Sora 2 Portrait", "Sora 2 Pro Landscape", and "Sora 2 Pro Portrait".
Just writing a prompt is enough to generate your video. Since the guardrails are strong, you had better refer to the OpenAI Guide page.
Attach an image to your prompt. The image is automatically resized to fit the Sora 2 requirement. It is used as a first frame. Video generation will fail with the people face or human-like objects because of the OpenAI guardrails.
Continue your conversation. Your message is used to modify the video generated with the remix API.