Video Diffusion
Video Generation
Video Diffusion
Generate videos from text or images
POST
Video Diffusion
Documentation Index
Fetch the complete documentation index at: https://docs.legnext.ai/llms.txt
Use this file to discover all available pages before exploring further.
Headers
| Header | Type | Required | Description |
|---|---|---|---|
x-api-key | string | Yes | Your API key |
Request Body
Image-to-Video Mode
Choose one of two input methods: Option 1: Using existing generated image| Parameter | Type | Required | Description |
|---|---|---|---|
jobId | string | Yes | ID of the source image generation task |
imageNo | integer | Yes | Image number to animate (0/1/2/3) |
prompt | string | No | Video generation prompt text (1-8192 characters) |
videoType | integer | No | Video quality type (0: 480p, 1: 720p) |
callback | string | No | Callback URL for task completion notifications |
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Video generation prompt text with image URL included, format: “[image_url] your prompt text” (1-8192 characters) |
videoType | integer | No | Video quality type (0: 480p, 1: 720p) |
callback | string | No | Callback URL for task completion notifications |
Video Types
| Value | Resolution | Description |
|---|---|---|
| 0 | 480p | Standard definition (default) |
| 1 | 720p | High definition |
Advanced Parameters
You can add these parameters to your prompt for more control over video generation:Motion Intensity
Control the amount of movement in the generated video:- Low Motion (default): Static scenes with subtle movements
- Add
--motion lowto your prompt
- Add
- High Motion: Large camera movements and dramatic motion (may produce artistic effects)
- Add
--motion highto your prompt
- Add
Raw Mode
Reduce automatic system enhancements for more precise control over the output:- Add
--rawto your prompt
End Frame Image
Specify the final frame of your video by providing an image URL:- Add
--end [image_url]to your prompt
Video Loop
Generate a video where the last frame matches the first frame, creating a seamless loop:- Add
--loopto your prompt
Batch Size
Control the number of videos generated in a single task. This affects the cost accordingly:- Add
--bs [1|2|4]to your prompt - Valid values: 1, 2, or 4
- Default: 4
Combining Parameters
You can combine multiple parameters in a single prompt: Example:Example Requests
Image-to-Video (Using existing image)
Image-to-Video (Using image URL)
Response
Returns a task object containing the task information.This is the initial success response. Use the
job_id to check the task status via the Get Task endpoint to retrieve the completed result with video URLs.Authorizations
API key for authentication
Body
application/json
- Option 1
- Option 2
ID of the source image generation task (for existing image mode)
Image number to animate (0/1/2/3) (for existing image mode)
Required range:
0 <= x <= 3Video generation prompt text (required for prompt mode, optional for existing image mode)
Required string length:
1 - 8192Video quality type (0=480p, 1=720p)
Required range:
0 <= x <= 1Callback URL for task completion notifications
Response
Video generation task created successfully