Skip to main content
Access Notice SD2.0 is not yet available to all users. Contact LaoZhang API support to request access: Telegram @laozhang_cn. Base URL: https://api.yelinai.com Required endpoints: 2
  1. POST /v1/video/generations: create a video generation task
  2. GET /v1/video/generations/{task_id}: query task status and get the result URL

API Flow

SD2.0 video generation is an asynchronous task API. Create a task first, poll the task by task_id, then download the video after the task completes.
  1. Create task
Call POST /v1/video/generations with the model, prompt, video parameters, and optional reference files.
  1. Poll status
Call GET /v1/video/generations/{task_id} and check status.
  1. Download video
When status=completed, read the video URL from the response and download the mp4. Common status progression:
Failed tasks usually return failed with an error field.

Models

Create Task

POST /v1/video/generations Create an SD2.0 video generation task.

Headers

Request Parameters

File Reference Syntax

Reference files by upload order in the prompt:

Text-to-video Example

Image Reference Example

Multi-asset Reference Example

First/Last Frame Control Example

Create Response

Response fields:

Query Task

GET /v1/video/generations/{task_id} Query the status of a video generation task.

Path Parameters

Query Response

In progress:
Completed:
Failed:
Response fields:

Download Video

After the query response returns completed, read video_url and download it directly:
video_url is usually a temporary signed URL. Download it immediately or copy it to your own object storage.

Full Python Example

FAQ

What are the file upload limitations? Currently supports jpg, png image formats and mp4 video format. Individual file size should not exceed 50MB. How to correctly reference uploaded files? By upload order, use @IMG_1, @IMG_2 for images, and @VID_1, @VID_2 for videos. How long does a task take to complete? Typically 30-120 seconds depending on video duration and server load. Recommended polling interval is 20-30 seconds.