跳轉到主要內容

概述

AI 視頻生成正在快速發展。Ace Data Cloud 提供了 7 種視頻生成 API,覆蓋從文生視頻到圖生視頻的各類場景。

可用視頻生成服務

服務端點模型特點
SoraPOST /sora/videossora-2, sora-2-proOpenAI 出品,電影級畫質
VeoPOST /veo/videosveo3, veo3-fastGoogle 出品,支持 4K
KlingPOST /kling/videoskling-v2-5-turbo快手出品,速度快
LumaPOST /luma/videos首尾幀控制
HailuoPOST /hailuo/videosminimax-t2vMiniMax 出品
SeedancePOST /seedance/videosdoubao-seedance-1-0-pro-250528字節出品
WanPOST /wan/videoswan2.6-t2v阿里出品

快速入門

Sora 視頻生成

import requests

response = requests.post(
    "https://api.acedata.cloud/sora/videos",
    headers={
        "Authorization": "Bearer YOUR_API_TOKEN",
        "Content-Type": "application/json",
    },
    json={
        "prompt": "A cat playing in a sunny garden",
        "model": "sora-2",
        "duration": 10,
        "orientation": "landscape",
    },
)
print(response.json())

Kling 視頻生成

response = requests.post(
    "https://api.acedata.cloud/kling/videos",
    headers={
        "Authorization": "Bearer YOUR_API_TOKEN",
        "Content-Type": "application/json",
    },
    json={
        "action": "text2video",
        "prompt": "A white cat walking in the snow",
        "model": "kling-v2-5-turbo",
        "duration": 5,
        "aspect_ratio": "16:9",
    },
)
print(response.json())

Veo 視頻生成

response = requests.post(
    "https://api.acedata.cloud/veo/videos",
    headers={
        "Authorization": "Bearer YOUR_API_TOKEN",
        "Content-Type": "application/json",
    },
    json={
        "action": "text2video",
        "prompt": "A coffee mug rotating on a marble counter",
        "model": "veo3",
    },
)
print(response.json())

非同步任務處理

視頻生成通常需要較長時間。所有視頻 API 都支持:
  1. 回調通知:在請求中設置 callback_url,生成完成後自動推送結果
  2. 輪詢查詢:通過 /tasks 端點查詢任務進度
# 使用回調 URL
data = {
    "prompt": "A sunrise over mountains",
    "model": "sora-2",
    "callback_url": "https://your-server.com/webhook",
}

# 或輪詢任務狀態
task_response = requests.post("https://api.acedata.cloud/sora/tasks",
    headers={"Authorization": "Bearer YOUR_API_TOKEN"},
    json={"task_id": "your-task-id"})

選擇建議

  • 最佳畫質:Sora(sora-2-pro)
  • 最快速度:Kling(kling-v2-5-turbo)
  • 最高解析度:Veo(支持 4K)
  • 首尾幀控制:Luma
  • 性價比:Wan
前往 platform.acedata.cloud 免費體驗。