Skip to main content
API REFERENCE

Video generation API reference

The endpoint follows New API / OpenAI Video conventions. Submit an asynchronous task, poll its status, and read metadata.url after completion.

Last updated

Connection details

ItemValue
Base URLhttps://ling-light.com
AuthenticationAuthorization: Bearer <API_KEY>
Request formatapplication/json
Task modelAsynchronous submit, poll, and read
TimestampsUnix seconds
Model discoveryGET /v1/models

Endpoints

MethodPathPurpose
GET/v1/modelsList models available to the API key
POST/v1/videosCreate an asynchronous video task
GET/v1/videos/{id}Read task status and the video URL

Create a video task

FieldTypeRequiredDescription
modelstringYesA model ID returned by GET /v1/models
promptstringYesVideo generation prompt
secondsintegerNoVideo duration in seconds
resolutionstringNoFor example 480p, 720p, or 1080p
aspect_ratiostringNoFor example 16:9, 9:16, 1:1, or auto
referencesobject[]NoReference material array
Create an async taskbash
curl --request POST "https://ling-light.com/v1/videos" \
  --header "Authorization: Bearer $VIDEO_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Idempotency-Key: $(uuidgen)" \
  --data '{
    "model": "seedance2.0",
    "prompt": "An orange cat watching rain from a windowsill, slow camera push-in",
    "seconds": 5,
    "resolution": "720p",
    "aspect_ratio": "16:9"
  }'

Generation modes

Modereferences rule
Text to videoreferences is empty or omitted
First and last frameExactly one first_frame and one last_frame image
Reference to videoOne or more role=reference image, video, or audio items
Create responsejson
{
  "id": "task_xxxxxxxxxxxxxxxx",
  "object": "video",
  "model": "seedance2.0",
  "status": "queued",
  "progress": 0,
  "created_at": 1793433600,
  "seconds": "5",
  "metadata": {
    "aspect_ratio": "16:9",
    "resolution": "720p"
  }
}

Poll and read the result

Poll every 3 to 5 seconds. completed and failed are terminal. Do not treat progress=100 as success by itself.

Completed responsejson
{
  "id": "task_xxxxxxxxxxxxxxxx",
  "object": "video",
  "model": "seedance2.0",
  "status": "completed",
  "progress": 100,
  "created_at": 1793433600,
  "completed_at": 1793433690,
  "seconds": "5",
  "metadata": {
    "resolution": "720p",
    "aspect_ratio": "16:9",
    "url": "https://media.example.com/videos/task_xxxxxxxxxxxxxxxx.mp4"
  }
}

Security and result handling

  • Store model API keys only in server-side environment variables or a secrets manager.
  • Never place a full key, login session, or console access token in browser requests, source control, or logs.
  • metadata.url is an object-storage URL. Download and persist the video promptly.
  • Apply your own business review to prompts and reference materials.
Next: quickstart
Create an account and API key, then run the first task.
Tasks and errors
Handle polling, terminal states, idempotency, and failures.