Skip to main content

Overview

For coding agents, discover the current recommended video shortlist first with GET /v1/models?recommended_for=video, then send the selected model explicitly to this endpoint.
Video generation is asynchronous. You submit a request, receive a canonical async task ID and poll_url, then poll for the result.
For the most reliable polling behavior, follow the exact poll_url returned by the create request.
If a create response returns poll_url, call that exact URL. When it points to /v1/tasks/{id}, treat that as the canonical fixed status endpoint.
The async task identifier may surface as id or task_id depending on the adapter. Treat them as the same task identity.
Audio output is model-dependent. In LemonData, Veo 3 family requests default to audio-on when output_audio is omitted. When a model supports audio control, use output_audio to explicitly toggle it. The camelCase alias outputAudio is also accepted for compatibility.
For production integrations, prefer publicly reachable https URLs for images, videos, and audio. Inline data: URLs remain supported for compatible models, but large base64 payloads are harder to retry, inspect, and debug.

Request Body

model
string
default:"sora-2"
Video model ID. API default is sora-2. See the Video Generation Guide for the current public model matrix and supported capabilities.
prompt
string
required
Text description of the video to generate. Required for most public video models.
operation
string
Video operation to run. Supported contract values include text-to-video, image-to-video, reference-to-video, start-end-to-video, video-to-video, video-extension, audio-to-video, and motion-control. LemonData can infer the operation from the supplied inputs, but explicit operation is recommended for production reliability.
image_url
string
Publicly accessible URL of the starting image for image-to-video generation. For best cross-model compatibility, prefer image_url.
image
string
Inline image as a data URL (for example, data:image/jpeg;base64,...). Supported by compatible models, but image_url provides the broadest compatibility across public video models.
reference_images
array
Reference image inputs for models that support dedicated reference conditioning. Provide up to 3 items. Public https URLs are recommended; compatible models also accept inline data: URLs.
reference_image_type
string
Optional reference role for models that distinguish between asset and style references.
video_url
string
Publicly accessible URL of the source video. Required for video-to-video style flows and for motion-control models that combine a subject image with a motion reference video.
audio_url
string
Publicly accessible audio URL for models that support audio-to-video.
task_id
string
Provider-specific task identifier used by some continuation, extension, or derivative flows.
extend_at
integer
Model-specific extension start offset used by some video-extension flows.
extend_times
string
Model-specific extension multiplier or repeat count used by some video-extension flows.
duration
integer
Video duration in seconds (model-dependent).
aspect_ratio
string
Aspect ratio (for example, 16:9, 9:16, or 1:1).
resolution
string
Model-dependent output resolution (for example, 720p, 1080p, or 4k).
output_audio
boolean
Model-dependent audio output toggle. In LemonData, Veo 3 family requests default to true when this field is omitted. Other public video models follow their governed default behavior. The camelCase alias outputAudio is accepted for compatibility.
fps
integer
Frames per second (1-120) for models that expose FPS control.
negative_prompt
string
What to avoid in the generated video.
seed
integer
Random seed for reproducible generation.
cfg_scale
number
Prompt adherence strength (0-20) for models that expose CFG-style control.
motion_strength
number
Motion intensity (0-1) for models that expose it.
start_image
string
URL or compatible image input for the first frame in start-end-to-video.
end_image
string
URL or compatible image input for the last frame in start-end-to-video.
size
string
Model-specific size tier used by some OpenAI-compatible video models.
watermark
boolean
Optional watermark toggle for models that expose it.
effect_type
string
Model-specific effect selector for specialized editing flows.
user
string
A unique identifier for the end-user.

Compatibility Notes

  • Canonical public fields are snake_case: reference_images, reference_image_type, and output_audio.
  • For compatibility, LemonData also accepts the camelCase aliases referenceImages, referenceImageType, and outputAudio.
  • If operation is omitted, LemonData infers it from the supplied inputs. For production traffic, explicit operation is still recommended.

Media Input Best Practices

  • Prefer publicly reachable https URLs over inline base64 for image_url, reference_images, video_url, and audio_url.
  • Avoid mixing inline base64 and remote URLs in the same request when possible; using one representation per request is easier to reason about and debug.
  • If you use signed URLs, keep them valid long enough to cover retries and asynchronous task creation.

Response

id
string
Canonical async task identifier. Treat this as the same identity as task_id when both are present.
task_id
string
Canonical async task identifier for polling. This is the same task identity used by async status endpoints.
poll_url
string
Preferred polling URL for this task. Use this exact path when checking status.
status
string
Initial status: pending.
created
integer
Unix timestamp when the task was created.
model
string
Model used.
video_url
string
Direct video URL when the result is already available.
video
object
Single video payload with url, duration, width, and height when available.
videos
array
Multiple video payloads when the provider returns more than one output.
error
string
Error message or structured error object when the task fails.
curl -X POST "https://api.lemondata.cc/v1/videos/generations" \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sora-2",
    "prompt": "A cat walking through a garden, cinematic lighting",
    "operation": "text-to-video",
    "duration": 4,
    "aspect_ratio": "16:9"
  }'
{
  "id": "video_abc123",
  "task_id": "video_abc123",
  "poll_url": "/v1/tasks/video_abc123",
  "status": "pending",
  "model": "sora-2",
  "created": 1706000000
}

Image to Video

response = requests.post(
    "https://api.lemondata.cc/v1/videos/generations",
    headers={"Authorization": "Bearer sk-your-api-key"},
    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/image.jpg",
        "duration": 6,
        "aspect_ratio": "16:9"
    }
)

Reference to Video

Use operation=reference-to-video when the model supports dedicated reference-image conditioning. For LemonData’s public contract, pass reference assets through reference_images.
response = requests.post(
    "https://api.lemondata.cc/v1/videos/generations",
    headers={"Authorization": "Bearer sk-your-api-key"},
    json={
        "model": "veo3.1",
        "prompt": "Keep the same subject identity, palette, and framing while adding subtle natural motion.",
        "operation": "reference-to-video",
        "reference_images": [
            "https://example.com/ref-a.jpg",
            "https://example.com/ref-b.jpg"
        ],
        "reference_image_type": "asset",
        "duration": 8,
        "resolution": "720p",
        "aspect_ratio": "9:16"
    }
)

Keyframe Control

Use start_image and end_image to control the first and last frames:
response = requests.post(
    "https://api.lemondata.cc/v1/videos/generations",
    headers={"Authorization": "Bearer sk-your-api-key"},
    json={
        "model": "viduq2-pro",
        "prompt": "Smooth transition from day to night",
        "operation": "start-end-to-video",
        "start_image": "https://example.com/day.jpg",
        "end_image": "https://example.com/night.jpg",
        "duration": 5,
        "resolution": "720p",
        "aspect_ratio": "16:9"
    }
)

Video to Video

Use operation=video-to-video when the model accepts an existing video as the primary input.
response = requests.post(
    "https://api.lemondata.cc/v1/videos/generations",
    headers={"Authorization": "Bearer sk-your-api-key"},
    json={
        "model": "topaz-video-upscale",
        "operation": "video-to-video",
        "video_url": "https://example.com/source.mp4",
        "prompt": "Upscale the clip while preserving the original motion.",
        "resolution": "1080p"
    }
)

Motion Control

Use operation=motion-control when the model expects both a subject image and a motion reference video. LemonData maps the public image_url + video_url request shape to the upstream motion-control contract.
response = requests.post(
    "https://api.lemondata.cc/v1/videos/generations",
    headers={"Authorization": "Bearer sk-your-api-key"},
    json={
        "model": "kling-3.0-motion-control",
        "operation": "motion-control",
        "prompt": "Keep the subject identity stable while following the motion reference.",
        "image_url": "https://example.com/subject.png",
        "video_url": "https://example.com/motion.mp4",
        "resolution": "720p"
    }
)

Audio-to-Video and Video Extension Availability

LemonData’s public contract accepts audio-to-video and video-extension for model-specific flows, but the current generally enabled public video model list in this docs build does not include a broad public model that advertises either capability. Use the Models API or the Models page to confirm current availability before integrating those operations.

Currently Enabled Public Video Models

This list is aligned with the current enabled public video model inventory in this docs build. For the freshest state, query the Models API.

OpenAI

ModelPublic operations
sora-2Text-to-video, image-to-video
sora-2-proText-to-video, image-to-video
sora-2-pro-storyboardImage-to-video

Kuaishou

ModelPublic operations
kling-3.0-motion-controlMotion control
kling-3.0-videoText-to-video, image-to-video, start-end-to-video
kling-v2.5-turbo-proText-to-video, image-to-video, start-end-to-video
kling-v2.5-turbo-stdText-to-video, image-to-video
kling-v2.6-proText-to-video, image-to-video, start-end-to-video
kling-v2.6-stdText-to-video, image-to-video
kling-v3.0-proText-to-video, image-to-video, start-end-to-video
kling-v3.0-stdText-to-video, image-to-video, start-end-to-video
kling-video-o1-proText-to-video, image-to-video, reference-to-video, start-end-to-video, video-to-video
kling-video-o1-stdText-to-video, image-to-video, reference-to-video, start-end-to-video, video-to-video

Google

ModelPublic operations
veo3Text-to-video, image-to-video
veo3-fastText-to-video, image-to-video
veo3-proText-to-video, image-to-video
veo3.1Text-to-video, image-to-video, reference-to-video, start-end-to-video
veo3.1-fastText-to-video, image-to-video, reference-to-video, start-end-to-video
veo3.1-proText-to-video, image-to-video, start-end-to-video

ByteDance

ModelPublic operations
seedance-1.5-proText-to-video, image-to-video

MiniMax

ModelPublic operations
hailuo-2.3-fastImage-to-video
hailuo-2.3-proText-to-video, image-to-video
hailuo-2.3-standardText-to-video, image-to-video

Alibaba

ModelPublic operations
wan-2.2-plusText-to-video, image-to-video
wan-2.5Text-to-video, image-to-video
wan-2.6Text-to-video, image-to-video, reference-to-video

Shengshu

ModelPublic operations
viduq2Text-to-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-proText-to-video, image-to-video, start-end-to-video
viduq3-turboText-to-video, image-to-video, start-end-to-video

xAI

ModelPublic operations
grok-imagine-image-to-videoImage-to-video
grok-imagine-text-to-videoText-to-video
grok-imagine-upscaleVideo-to-video

Other

ModelPublic operations
topaz-video-upscaleVideo-to-video