Skip to main content
POST
https://ai.kaiho.cc
/
v1
/
videos
/
generations
Sora2 Video Generation
curl --request POST \
  --url https://ai.kaiho.cc/v1/videos/generations \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "<string>",
  "duration": 123,
  "resolution": "<string>"
}
'

Overview

Sora2 is OpenAI’s latest video generation model capable of creating realistic video content from text descriptions, supporting various resolutions and durations.
Async Task: Video generation is an asynchronous operation. Use the Task Management API to query generation status.

Supported Models

Sora2

OpenAI’s latest video generation model

Sora Turbo

Faster generation speed

Runway Gen-3

High-quality video generation

Pika 1.5

Creative video generation

Request Parameters

prompt
string
required
Video description text, up to 500 characters. Describe scenes, actions, camera movements, etc. in detail.
duration
integer
default:5
Video duration in seconds, range 2-20 seconds.
resolution
string
default:"1280x720"
Video resolution:
  • 1920x1080 - Full HD
  • 1280x720 - HD
  • 640x360 - SD
  • 1024x1024 - Square (social media)

Request Example

import requests
import time

# Create video generation task
response = requests.post(
    "https://ai.kaiho.cc/v1/videos/generations",
    headers={
        "Content-Type": "application/json",
        "Authorization": "Bearer YOUR_API_KEY"
    },
    json={
        "model": "sora-2",
        "prompt": "A golden retriever chasing falling leaves in an autumn park, sunlight filtering through trees, slow motion, cinematic quality",
        "duration": 10,
        "resolution": "1920x1080",
        "fps": 30,
        "style": "cinematic"
    }
)

task_id = response.json()["id"]

# Poll task status
while True:
    status = requests.get(
        f"https://ai.kaiho.cc/v1/tasks/{task_id}",
        headers={"Authorization": "Bearer YOUR_API_KEY"}
    ).json()
    
    if status["status"] == "completed":
        print(f"Video completed: {status['result']['video_url']}")
        break
    
    time.sleep(5)

Prompt Templates

[Scene]: Magnificent mountain landscape
[Time]: Sunrise
[Lighting]: Golden morning light piercing through clouds
[Camera]: Drone slowly ascending
[Style]: Documentary-grade, BBC Earth style
Storage Duration: Generated videos are saved for 7 days. Please download promptly.