1. Video
Nebula-API操作文档
🇺🇸English
  • 🇨🇳中文
  • 🇺🇸English
  • Chat
    • General Text Dialogue Interface Document
    • Tongyi Qianwen General Dialogue Interface Document
    • DeepSeek General Dialogue Document
    • GPT Chat General Dialogue Document
    • Grok Model (xAI) General Dialogue Interface Document
  • Image
    • General Image Generation Interface Document
    • Nano Banana Image Generation Interface Document
    • Tongyi Qianwen Text to Image Model Interface Document
    • Tongyi Qianwen Image Editing Model Interface Document
  • Video
    • Sora-2 interface document
    • Alibaba Wanxiang Wan2.5 Tu Sheng Video Interface Document
    • Google Veo Video Model Interface Document
    • General Video Generation Interface Document
  • AI App
    • Cherry Studio Integration Guide
    • LangChain Development Framework Integration Guide
    • Cursor Code Editor Integration Guide
    • Claude Code and other client integration guidelines
    • Cline (VS Code) AI Programming Assistant Integration Guide
    • Immersive Translation Integration Guide
  • Real time conversation
    • Realtime real-time conversation document
  1. Video

General Video Generation Interface Document

Video Generation API Development Documentation#

Introduction#

This API supports Kling, Doubao (Volcengine), and Jimeng video generation large models, providing functions such as text-to-video, image-to-video (first frame), and image-to-video (first and last frames). It deeply understands text and image instructions to generate video content with excellent visual fluidity, supports fine-tuning of multi-dimensional parameters, and brings a professional-grade video generation experience for creative expression.

Request Parameters#

API Endpoint#

POST https://llm.ai-nebula.com/v1/video/generations

Request Headers#

ParameterTypeRequiredDescription
AuthorizationstringYesUser authentication token (Bearer sk-xxxx)
Content-TypestringYesapplication/json

Common Request Parameters#

ParameterTypeRequiredDescription
modelstringYesModel identifier:
• Kling: kling-v1
• Doubao: doubao-video-v1
• Jimeng: jimeng_vgfm_t2v_l20
promptstringYesVideo generation prompt, supports Chinese and English
imagestringNoFirst frame reference image URL or Base64 encoding
image_tailstringNoKling/Doubao specific: Last frame reference image URL or Base64 encoding, used for image-to-video (first and last frames)
durationnumberNoVideo duration (seconds), default 5 seconds
widthintegerNoVideo width (pixels), default 1280
heightintegerNoVideo height (pixels), default 720
fpsintegerNoVideo frame rate, default 24
seedintegerNoRandom seed, default -1 (random), value range 0-999999999
nintegerNoGeneration quantity, default 1
response_formatstringNoResponse format, default "url"
aspect_ratiostringNoAspect ratio, e.g., "16:9", "9:16"
resolutionstringNoDoubao specific: Resolution enumeration values (480p/720p/1080p)
modestringNoKling specific: Generation mode (std/pro)
cfg_scalenumberNoKling 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_promptstringNoNegative prompt, describing content not desired to appear
quality_levelstringNoQuality level: low/medium/high/ultra-high
watermarkbooleanNoDoubao specific: Whether to add a watermark, default false
camera_fixedbooleanNoDoubao specific: Whether to fix the camera, default false
userstringNoUser identifier
metadataobjectNoVendor-specific parameters, see details below

metadata Parameter Description#

The metadata field is used to pass vendor-specific parameters. Please refer to the official documentation for detailed parameters of each model:
Kling Official Documentation: https://app.klingai.com/cn/dev/document-api/apiReference/model/imageToVideo
Doubao Official Documentation: https://www.volcengine.com/docs/82379/1520757?redirect=1
Jimeng Official Documentation: https://www.volcengine.com/docs/85621/1544774#tjsNFM50

Submit Video Generation Task Example#

Submit Video Generation Task Response Example#

{
 "code": "success",
 "message": "",
 "data": {
  "task_id": "abcd1234efgh5678",
  "action": "video_generation",
  "status": "SUBMITTED",
  "submit_time": 1640995200
 }
}

Response Parameter Description#

Field NameTypeDescription
codestringResponse status code, "success" when successful
messagestringResponse message
data.task_idstringUnique task identifier
data.actionstringTask type, fixed as "video_generation"
data.statusstringTask status, "SUBMITTED" when submission is successful
data.submit_timeint64Unix timestamp of task submission

Query Video Generation Task Example#

Query Video Generation Task Response Example#

{
 "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
  }
 }
}

Response Parameter Description#

Field NameTypeDescription
codestringResponse status code, "success" when successful
messagestringResponse message
data.task_idstringUnique task identifier
data.actionstringTask type, fixed as "video_generation"
data.statusstringTask status, see status enumeration below
data.fail_reasonstringSpecific reason when the task fails
data.submit_timeint64Unix timestamp of task submission
data.start_timeint64Unix timestamp when task processing started
data.finish_timeint64Unix timestamp when task completed
data.progressstringTask progress percentage
data.dataobjectTask result data
data.data.video_urlstringGenerated video URL
data.data.durationnumberVideo duration (seconds)
data.data.widthintegerVideo width (pixels)
data.data.heightintegerVideo height (pixels)
data.data.fpsintegerVideo frame rate

Task Status Enumeration#

NOT_START - Not started
SUBMITTED - Submitted
QUEUED - Queued
IN_PROGRESS - In progress
SUCCESS - Success
FAILURE - Failure
UNKNOWN - Unknown

Error Handling#

When a request fails, the API returns corresponding error information and an HTTPS status code:
{
 "code": "error",
 "message": "Error description",
 "data": null
}
Common error codes:
401 - Authentication failed, please check the Authorization header
400 - Request parameter error
429 - Request frequency limit exceeded
500 - Internal server error

Usage Notes#

1.
Authentication: Ensure the Authorization header contains a valid token (format Bearer sk-xxxx) before calling the interface.
2.
Image Format: Supports URL links and Base64 encoding. When using Base64 encoding, there is no need to add the data:image prefix.
3.
Image-to-Video (First/Last Frame): When using image and image_tail parameters, the aspect ratios of both images should remain consistent.
4.
Task Query: Video generation is an asynchronous task; you need to poll the task status until it is completed.
5.
Video Link: The generated video URL is a temporary link; it is recommended to download and save it promptly.
6.
Parameter Priority: Common parameters have higher priority than parameters with the same name in metadata.
7.
Model Specific Parameters: Certain parameters are only supported by specific models; please refer to the corresponding official documentation before use.
修改于 2025-12-04 07:49:22
上一页
Google Veo Video Model Interface Document
下一页
Cherry Studio Integration Guide
Built with