POST https://llm.ai-nebula.com/v1/video/generations| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | User authentication token (Bearer sk-xxxx) |
| Content-Type | string | Yes | application/json |
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model identifier: • Kling: kling-v1• Doubao: doubao-video-v1• Jimeng: jimeng_vgfm_t2v_l20 |
prompt | string | Yes | Video generation prompt, supports Chinese and English |
image | string | No | First frame reference image URL or Base64 encoding |
image_tail | string | No | Kling/Doubao specific: Last frame reference image URL or Base64 encoding, used for image-to-video (first and last frames) |
duration | number | No | Video duration (seconds), default 5 seconds |
width | integer | No | Video width (pixels), default 1280 |
height | integer | No | Video height (pixels), default 720 |
fps | integer | No | Video frame rate, default 24 |
seed | integer | No | Random seed, default -1 (random), value range 0-999999999 |
n | integer | No | Generation quantity, default 1 |
response_format | string | No | Response format, default "url" |
aspect_ratio | string | No | Aspect ratio, e.g., "16:9", "9:16" |
resolution | string | No | Doubao specific: Resolution enumeration values (480p/720p/1080p) |
mode | string | No | Kling specific: Generation mode (std/pro) |
cfg_scale | number | No | Kling specific: Freedom of video generation; the larger the value, the smaller the model's freedom and the stronger the correlation with the user's input prompt. Value range [0, 1] |
negative_prompt | string | No | Negative prompt, describing content not desired to appear |
quality_level | string | No | Quality level: low/medium/high/ultra-high |
watermark | boolean | No | Doubao specific: Whether to add a watermark, default false |
camera_fixed | boolean | No | Doubao specific: Whether to fix the camera, default false |
user | string | No | User identifier |
metadata | object | No | Vendor-specific parameters, see details below |
metadata field is used to pass vendor-specific parameters. Please refer to the official documentation for detailed parameters of each model:{
"code": "success",
"message": "",
"data": {
"task_id": "abcd1234efgh5678",
"action": "video_generation",
"status": "SUBMITTED",
"submit_time": 1640995200
}
}| Field Name | Type | Description |
|---|---|---|
code | string | Response status code, "success" when successful |
message | string | Response message |
data.task_id | string | Unique task identifier |
data.action | string | Task type, fixed as "video_generation" |
data.status | string | Task status, "SUBMITTED" when submission is successful |
data.submit_time | int64 | Unix timestamp of task submission |
{
"code": "success",
"message": "",
"data": {
"task_id": "abcd1234efgh5678",
"action": "video_generation",
"status": "SUCCESS",
"fail_reason": "",
"submit_time": 1640995200,
"start_time": 1640995210,
"finish_time": 1640995800,
"progress": "100%",
"data": {
"video_url": "https://example.com/generated-video.mp4",
"duration": 5.0,
"width": 1280,
"height": 720,
"fps": 24
}
}
}| Field Name | Type | Description |
|---|---|---|
code | string | Response status code, "success" when successful |
message | string | Response message |
data.task_id | string | Unique task identifier |
data.action | string | Task type, fixed as "video_generation" |
data.status | string | Task status, see status enumeration below |
data.fail_reason | string | Specific reason when the task fails |
data.submit_time | int64 | Unix timestamp of task submission |
data.start_time | int64 | Unix timestamp when task processing started |
data.finish_time | int64 | Unix timestamp when task completed |
data.progress | string | Task progress percentage |
data.data | object | Task result data |
data.data.video_url | string | Generated video URL |
data.data.duration | number | Video duration (seconds) |
data.data.width | integer | Video width (pixels) |
data.data.height | integer | Video height (pixels) |
data.data.fps | integer | Video frame rate |
NOT_START - Not startedSUBMITTED - SubmittedQUEUED - QueuedIN_PROGRESS - In progressSUCCESS - SuccessFAILURE - FailureUNKNOWN - Unknown{
"code": "error",
"message": "Error description",
"data": null
}401 - Authentication failed, please check the Authorization header400 - Request parameter error429 - Request frequency limit exceeded500 - Internal server errorAuthorization header contains a valid token (format Bearer sk-xxxx) before calling the interface.data:image prefix.image and image_tail parameters, the aspect ratios of both images should remain consistent.metadata.