跳轉到主要內容

概覽

LemonData 透過單一統一 API 提供影片生成能力。影片生成是非同步流程:提交請求後,會回傳 task_idpoll_url,之後再輪詢任務狀態以取得最終結果。
如果建立回應有返回 poll_url,請優先直接呼叫該網址。若它指向 /v1/tasks/{id},就把它視為公開影片任務的規範狀態入口;/v1/videos/generations/{id} 只保留相容用途。
模型庫存會持續變化。若要取得最新的公開影片模型可用性,請使用 Models API 或造訪模型頁面
音訊行為取決於具體模型。在 LemonData 中,Veo 3 家族在省略 output_audio 時預設按有聲處理;部分公開模型預設無聲,或僅提供無聲版本。
在生產環境中,建議優先使用公網可存取的 https URL 作為圖片、影片與音訊輸入。相容模型仍支援內嵌 data: URL,但 URL 在重試、觀測與除錯時通常更容易處理。

非同步工作流程

目前公開操作

LemonData 目前的公開影片契約主要覆蓋以下操作:
  • text-to-video
  • image-to-video
  • reference-to-video
  • start-end-to-video
  • video-to-video
  • motion-control
請求契約同時也接受 audio-to-videovideo-extension,用於模型特定流程;但在目前這版文件對應的「通用啟用」公開影片模型清單中,並沒有一個廣泛啟用的公開模型明確對外提供這兩項能力。

能力矩陣

圖例:✅ 該 Provider 家族中至少有一個目前啟用的公開影片模型支援此能力;❌ 目前啟用模型中未公開這項能力
SeriesT2VI2VReferenceStart-EndV2VMotion
OpenAI
Kuaishou
Google
ByteDance
MiniMax
Alibaba
Shengshu
xAI
Other

能力定義

  • T2V(Text-to-Video):根據文字 prompt 生成影片
  • I2V(Image-to-Video):根據起始圖片生成影片;為了獲得更好的相容性,建議傳入 image_url
  • Reference:透過 reference_images 傳入一張或多張參考圖進行條件控制
  • Start-End:透過 start_imageend_image 控制首幀與尾幀
  • V2V(Video-to-Video):以現有影片作為主要輸入
  • Motion:同時使用主體圖片與動作參考影片

目前公開模型清單

OpenAI

Model公開操作
sora-2文生影片、圖生影片
sora-2-pro文生影片、圖生影片
sora-2-pro-storyboard圖生影片

Kuaishou

Model公開操作
kling-3.0-motion-control動作控制
kling-3.0-video文生影片、圖生影片、首尾幀生影片
kling-v2.5-turbo-pro文生影片、圖生影片、首尾幀生影片
kling-v2.5-turbo-std文生影片、圖生影片
kling-v2.6-pro文生影片、圖生影片、首尾幀生影片
kling-v2.6-std文生影片、圖生影片
kling-v3.0-pro文生影片、圖生影片、首尾幀生影片
kling-v3.0-std文生影片、圖生影片、首尾幀生影片
kling-video-o1-pro文生影片、圖生影片、參考圖生影片、首尾幀生影片、影片轉影片
kling-video-o1-std文生影片、圖生影片、參考圖生影片、首尾幀生影片、影片轉影片

Google

Model公開操作
veo3文生影片、圖生影片
veo3-fast文生影片、圖生影片
veo3-pro文生影片、圖生影片
veo3.1文生影片、圖生影片、參考圖生影片、首尾幀生影片
veo3.1-fast文生影片、圖生影片、參考圖生影片、首尾幀生影片
veo3.1-pro文生影片、圖生影片、首尾幀生影片

ByteDance

Model公開操作
seedance-1.5-pro文生影片、圖生影片

MiniMax

Model公開操作
hailuo-2.3-fast圖生影片
hailuo-2.3-pro文生影片、圖生影片
hailuo-2.3-standard文生影片、圖生影片

Alibaba

Model公開操作
wan-2.2-plus文生影片、圖生影片
wan-2.5文生影片、圖生影片
wan-2.6文生影片、圖生影片、參考圖生影片

Shengshu

Model公開操作
viduq2文生影片、參考圖生影片
viduq2-pro圖生影片、參考圖生影片、首尾幀生影片
viduq2-pro-fast圖生影片、首尾幀生影片
viduq2-turbo圖生影片、首尾幀生影片
viduq3-pro文生影片、圖生影片、首尾幀生影片
viduq3-turbo文生影片、圖生影片、首尾幀生影片

xAI

Model公開操作
grok-imagine-image-to-video圖生影片
grok-imagine-text-to-video文生影片
grok-imagine-upscale影片轉影片

Other

Model公開操作
topaz-video-upscale影片轉影片

使用範例

文生影片

response = requests.post(f"{BASE}/videos/generations",
    headers=headers,
    json={
        "model": "sora-2",
        "prompt": "A calm cinematic shot of a cat walking through a sunlit garden.",
        "operation": "text-to-video",
        "duration": 4,
        "aspect_ratio": "16:9"
    }
)

圖生影片

response = requests.post(f"{BASE}/videos/generations",
    headers=headers,
    json={
        "model": "hailuo-2.3-standard",
        "prompt": "The scene begins from the provided image and adds gentle natural motion.",
        "operation": "image-to-video",
        "image_url": "https://example.com/portrait.jpg",
        "duration": 6,
        "aspect_ratio": "16:9"
    }
)

參考圖生影片

response = requests.post(f"{BASE}/videos/generations",
    headers=headers,
    json={
        "model": "veo3.1",
        "prompt": "Keep the same subject identity and palette while adding subtle motion.",
        "operation": "reference-to-video",
        "reference_images": [
            "https://example.com/ref-a.jpg",
            "https://example.com/ref-b.jpg"
        ],
        "duration": 8,
        "resolution": "720p",
        "aspect_ratio": "9:16"
    }
)

首尾幀控制

response = requests.post(f"{BASE}/videos/generations",
    headers=headers,
    json={
        "model": "viduq2-pro",
        "prompt": "Smooth transition from day to night.",
        "operation": "start-end-to-video",
        "start_image": "https://example.com/city-day.jpg",
        "end_image": "https://example.com/city-night.jpg",
        "duration": 5,
        "resolution": "720p",
        "aspect_ratio": "16:9"
    }
)

影片轉影片

response = requests.post(f"{BASE}/videos/generations",
    headers=headers,
    json={
        "model": "topaz-video-upscale",
        "operation": "video-to-video",
        "video_url": "https://example.com/source.mp4",
        "prompt": "Upscale this clip while preserving the original motion."
    }
)

動作控制

response = requests.post(f"{BASE}/videos/generations",
    headers=headers,
    json={
        "model": "kling-3.0-motion-control",
        "operation": "motion-control",
        "prompt": "Keep the subject stable while following the motion reference.",
        "image_url": "https://example.com/subject.png",
        "video_url": "https://example.com/motion.mp4",
        "resolution": "720p"
    }
)

參數說明

參數型別說明
operationstring在生產環境中,建議顯式傳入 operation
image_urlstring相容性最好的圖片輸入形式。
imagestring內嵌 data URL,適合本地除錯或小體積整合。
reference_imagesstring[]用於參考圖條件控制的公開規範欄位。
reference_image_typestring可選的 asset / style 角色選擇器。
video_urlstring目前公開的 video-to-videomotion-control 模型都需要這個欄位。
audio_urlstring用於模型特定音訊條件流程。
output_audiobooleanVeo 3 家族在省略時預設按 true 處理。

模型選擇建議

最高品質

若品質優先於速度,可優先考慮 veo3.1-prokling-video-o1-providuq3-pro

更快迭代

若需要更快出結果,可先嘗試 veo3.1-fasthailuo-2.3-fastviduq3-turbo

參考圖條件控制

若需要專門的參考圖條件控制,可優先考慮 veo3.1veo3.1-fastwan-2.6kling-video-o1-pro / std

影片轉影片

目前一般啟用的公開 video-to-video 路徑主要包括 topaz-video-upscalegrok-imagine-upscale 以及 kling-video-o1-pro / std

計費

影片計費會依模型而異。有些公開影片模型實際上偏向按次計費,有些則偏向按秒計費。請以模型頁面Pricing API 的即時公開價格為準。