Video Large Models
Overview
Video large models include text-to-video and image-to-video functionalities. Text-to-video refers to generating corresponding video content from input text descriptions, while image-to-video generates relevant videos from input images. These models find applications in fields such as film and television production, advertising creativity, and education and training.
Video Model List
Currently, the video generation models available in the Model Plaza include:
Loading Serverless API service list...
Usage Method
Enter a text description on the model usage interface, and the model will generate corresponding video content. Below is an example of using the Wan2.1-T2V-14B model:

Sample Code
All video models on ModelArk are invoked using asynchronous interfaces. For details, please refer to the sample code on the model experience page or the Asynchronous Interface Usage Guide.
import requests
import time
import json
import webbrowser
API_URL = "https://moark.ai/v1/async/videos/generations"
API_TOKEN = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" # Please replace with your access token
headers = {
"Authorization": f"Bearer {API_TOKEN}"
}
def query(payload):
response = requests.post(API_URL, headers=headers, json=payload)
return response.json()
def poll_task(task_id):
status_url = f"https://moark.ai/v1/task/{task_id}"
timeout = 30 * 60
retry_interval = 10
attempts = 0
max_attempts = int(timeout / retry_interval)
while attempts < max_attempts:
attempts += 1
print(f"Checking task status [{attempts}]...", end="")
response = requests.get(status_url, headers=headers, timeout=10)
result = response.json()
if result.get("error"):
print('error')
raise ValueError(f"{result['error']}: {result.get('message', 'Unknown error')}")
status = result.get("status", "unknown")
print(status)
if status == "success":
if "output" in result and "file_url" in result["output"]:
file_url = result["output"]["file_url"]
duration = (result.get('completed_at', 0) - result.get('started_at', 0)) / 1000
print(f"🔗 Donwload link: {file_url}")
print(f"⏱️ Task duration: {duration:.2f} seconds")
# Open the result URL in the browser
webbrowser.open(file_url)
else:
print("⚠️ No output URL found")
elif status in ["failed", "cancelled"]:
print(f"❌ Task {status}")
else:
time.sleep(retry_interval)
continue
task_file = f"task_{task_id}.json"
with open(task_file, "w") as f:
json.dump(result, f, indent=4)
print(f"Task was saved to file {task_file}")
return result
print(f"⏰ Maximum attempts reached ({max_attempts})")
return {"status": "timeout", "message": "maximum wait time exceeded"}
if __name__ == "__main__":
print("Creating task...")
result = query({
"model": "Wan2.1-T2V-1.3B",
"num_inferenece_steps": 50,
"num_frames": 81
})
task_id = result.get("task_id")
if not task_id:
raise ValueError("Task ID not found in the response")
print(f"Task ID: {task_id}")
task = poll_task(task_id)
if task.get("status") == "success":
# Do something with the task result here
print("Task completed successfully!")