Chuyển đến nội dung chính

Tổng quan

LemonData cung cấp khả năng tạo video thông qua một API hợp nhất. Quá trình này bất đồng bộ: bạn gửi yêu cầu, nhận task_idpoll_url, rồi kiểm tra trạng thái định kỳ cho tới khi có kết quả cuối cùng.
Danh sách model video công khai có thể thay đổi theo thời gian. Để xem tình trạng mới nhất, hãy dùng Models API hoặc truy cập trang Models.
Nếu phản hồi tạo trả về poll_url, hãy gọi đúng URL đó. Khi nó trỏ tới /v1/tasks/{id}, hãy xem đó là endpoint trạng thái cố định chuẩn.
Hành vi âm thanh phụ thuộc vào từng model. Trong LemonData, họ Veo 3 mặc định bật âm thanh khi bỏ qua output_audio. Một số model công khai chỉ hỗ trợ im lặng hoặc không cung cấp công tắc âm thanh ổn định.
Trong môi trường vận hành, nên ưu tiên URL https công khai thay vì base64 inline cho ảnh, video và âm thanh. Các model tương thích vẫn hỗ trợ URL data:, nhưng URL công khai sẽ dễ retry, kiểm tra và debug hơn.

Quy trình bất đồng bộ

Các thao tác công khai hiện tại

Hợp đồng video công khai hiện tại của LemonData tập trung vào các thao tác sau:
  • text-to-video
  • image-to-video
  • reference-to-video
  • start-end-to-video
  • video-to-video
  • motion-control
Hợp đồng yêu cầu cũng chấp nhận audio-to-videovideo-extension cho một số luồng đặc thù theo model, nhưng trong bản tài liệu hiện tại chưa có model công khai phổ biến nào quảng bá rõ ràng hai khả năng này.

Ma trận khả năng

Chú thích: ✅ Có ít nhất một model công khai đang bật trong nhóm nhà cung cấp đó hỗ trợ khả năng này | ❌ Hiện chưa có model công khai đang bật nào đại diện cho khả năng đó
NhómT2VI2VTham chiếuĐầu-CuốiV2VChuyển động
OpenAI
Kuaishou
Google
ByteDance
MiniMax
Alibaba
Shengshu
xAI
Khác

Giải thích khả năng

  • T2V (Text-to-Video): Tạo video từ prompt văn bản
  • I2V (Image-to-Video): Tạo video từ một ảnh đầu vào. Để tương thích rộng nhất, nên dùng image_url
  • Tham chiếu: Điều kiện hóa quá trình sinh bằng một hoặc nhiều ảnh tham chiếu qua reference_images
  • Đầu-Cuối: Điều khiển khung đầu và khung cuối bằng start_imageend_image
  • V2V (Video-to-Video): Dùng một video có sẵn làm đầu vào chính
  • Chuyển động: Kết hợp ảnh chủ thể với video tham chiếu chuyển động

Danh sách model công khai hiện tại

OpenAI

ModelThao tác công khai
sora-2Văn bản sang video, image-to-video
sora-2-proVăn bản sang video, image-to-video
sora-2-pro-storyboardImage-to-video

Kuaishou

ModelThao tác công khai
kling-3.0-motion-controlĐiều khiển chuyển động
kling-3.0-videoVăn bản sang video, image-to-video, start-end-to-video
kling-v2.5-turbo-proVăn bản sang video, image-to-video, start-end-to-video
kling-v2.5-turbo-stdVăn bản sang video, image-to-video
kling-v2.6-proVăn bản sang video, image-to-video, start-end-to-video
kling-v2.6-stdVăn bản sang video, image-to-video
kling-v3.0-proVăn bản sang video, image-to-video, start-end-to-video
kling-v3.0-stdVăn bản sang video, image-to-video, start-end-to-video
kling-video-o1-proVăn bản sang video, image-to-video, reference-to-video, start-end-to-video, video-to-video
kling-video-o1-stdVăn bản sang video, image-to-video, reference-to-video, start-end-to-video, video-to-video

Google

ModelThao tác công khai
veo3Văn bản sang video, image-to-video
veo3-fastVăn bản sang video, image-to-video
veo3-proVăn bản sang video, image-to-video
veo3.1Văn bản sang video, image-to-video, reference-to-video, start-end-to-video
veo3.1-fastVăn bản sang video, image-to-video, reference-to-video, start-end-to-video
veo3.1-proVăn bản sang video, image-to-video, start-end-to-video

ByteDance

ModelThao tác công khai
seedance-1.5-proVăn bản sang video, image-to-video

MiniMax

ModelThao tác công khai
hailuo-2.3-fastImage-to-video
hailuo-2.3-proVăn bản sang video, image-to-video
hailuo-2.3-standardVăn bản sang video, image-to-video

Alibaba

ModelThao tác công khai
wan-2.2-plusVăn bản sang video, image-to-video
wan-2.5Văn bản sang video, image-to-video
wan-2.6Văn bản sang video, image-to-video, reference-to-video

Shengshu

ModelThao tác công khai
viduq2Văn bản sang video, reference-to-video
viduq2-proImage-to-video, reference-to-video, start-end-to-video
viduq2-pro-fastImage-to-video, start-end-to-video
viduq2-turboImage-to-video, start-end-to-video
viduq3-proVăn bản sang video, image-to-video, start-end-to-video
viduq3-turboVăn bản sang video, image-to-video, start-end-to-video

xAI

ModelThao tác công khai
grok-imagine-image-to-videoImage-to-video
grok-imagine-text-to-videoVăn bản sang video
grok-imagine-upscaleVideo-to-video

Khác

ModelThao tác công khai
topaz-video-upscaleVideo-to-video

Ví dụ sử dụng

Text-to-video

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"
    }
)

Image-to-video

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"
    }
)

Reference-to-video

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"
    }
)

Start-end-to-video

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"
    }
)

Video-to-video

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."
    }
)

Motion control

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"
    }
)

Tham chiếu tham số

Tham sốKiểuGhi chú
operationstringTrong môi trường vận hành, nên truyền một cách tường minh
image_urlstringDạng đầu vào ảnh ổn định nhất
imagestringURL data: hữu ích cho thử nghiệm cục bộ và tích hợp nhỏ
reference_imagesstring[]Trường công khai chuẩn cho conditioning bằng ảnh tham chiếu
reference_image_typestringBộ chọn tùy chọn asset / style
video_urlstringBắt buộc với các model video-to-videomotion-control công khai hiện tại
audio_urlstringDùng cho các luồng sinh video có điều kiện bằng âm thanh nếu model hỗ trợ
output_audiobooleanHọ Veo 3 sẽ coi trường bị bỏ qua là true

Hướng dẫn chọn model nhanh

Chất lượng cao nhất

Nếu chất lượng quan trọng hơn tốc độ, veo3.1-pro, kling-video-o1-pro, và viduq3-pro là những lựa chọn mạnh.

Lặp nhanh

Nếu cần thử nghiệm nhanh, bạn có thể bắt đầu với veo3.1-fast, hailuo-2.3-fast, hoặc viduq3-turbo.

Luồng nhiều ảnh tham chiếu

Khi cần conditioning chuyên biệt bằng ảnh tham chiếu, hãy ưu tiên veo3.1, veo3.1-fast, wan-2.6, hoặc kling-video-o1-pro / std.

Video-to-video

Các đường video-to-video công khai đang bật phổ biến hiện nay chủ yếu gồm topaz-video-upscale, grok-imagine-upscale, và kling-video-o1-pro / std.

Billing

Billing phụ thuộc vào model. Một số model video công khai thực tế gần với cách tính phí theo request, trong khi một số model khác gần với cách tính theo thời lượng giây. Để xem mặt bằng giá công khai hiện tại, hãy tham khảo trang Models hoặc Pricing API.