Skip to main content
Generate videos using Sora-2 through Azure OpenAI.

Setup

export AZURE_API_KEY=your-key
export AZURE_API_BASE=https://your-resource.openai.azure.com
export AZURE_API_VERSION=2024-02-01

Usage

from praisonaiagents import VideoAgent

agent = VideoAgent(llm="azure/sora-2")
video = agent.start("A bird flying", output="bird.mp4")

Models

ModelDescription
azure/sora-2Standard quality
azure/sora-2-proHigher quality
azure/sora-2-pro-high-resMaximum resolution

Parameters

video = agent.generate(
    prompt="Your description",
    seconds="4",           # 4, 8, or 12
    size="1280x720"
)

Duration Options

  • "4" - 4 seconds
  • "8" - 8 seconds
  • "12" - 12 seconds