Skip to main content

Video Generation

Video generation is asynchronous. You submit a job, poll for completion, then download the MP4 result.

Flow

Endpoints

StepEndpointMethod
Submit/v1/videosPOST
Poll/v1/videos/{id}GET
Download/v1/videos/{id}/downloadGET

Full Example

import requests, time

# Step 1: Submit job
response = requests.post(
    "https://api.runcrate.ai/v1/videos",
    headers={
        "Authorization": "Bearer rc_live_YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
        "model": "google/veo-3.0",
        "prompt": "A cinematic sunrise over misty mountains",
        "duration": 6,
    },
)
job = response.json()
print("Job ID:", job["id"])

# Step 2: Poll for completion
while True:
    poll = requests.get(
        f"https://api.runcrate.ai/v1/videos/{job['id']}",
        headers={"Authorization": "Bearer rc_live_YOUR_API_KEY"},
    )
    data = poll.json()
    if data["status"] == "completed":
        break
    time.sleep(5)

# Step 3: Download the video
video = requests.get(
    f"https://api.runcrate.ai/v1/videos/{job['id']}/download",
    headers={"Authorization": "Bearer rc_live_YOUR_API_KEY"},
)
with open("video.mp4", "wb") as f:
    f.write(video.content)

Parameters

ParameterTypeDescription
modelstringModel ID (required)
promptstringText description (required)
durationintegerVideo length in seconds
aspect_ratiostring16:9 or 9:16
Duration options vary by model. Some models use discrete choices (e.g., 5s or 10s), others support a continuous range.

Available Video Models

ModelDurationsPricingNotes
Sora 24, 8, 12sPer secondOpenAI’s video model
Sora 2 Pro4, 8, 12sPer secondHigher quality variant
Veo 2.05–8sPer secondGoogle’s video model
Veo 3.04, 6, 8sPer secondLatest Google model
Veo 3.0 Audio4, 6, 8sPer secondVideo with generated audio
Kling v33–15sPer secondContinuous duration range
Seedance2–12sPer secondByteDance’s model
Hailuo 026, 10sPer secondMiniMax’s model

Job Statuses

StatusMeaning
queuedJob is waiting to start
processingVideo is being generated
completedReady for download
failedGeneration failed