跳转到主要内容

概述

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 免费体验。