API Notes
kirin_v1_5_i2v only supports first and last frame or only last frame (image + image_tail or image_tail only) when mode is pro
kirin_v1_5_i2v only supports motion brush (dynamic_masks/static_mask) when mode is pro and duration is 5 seconds
kirin_v1_5_i2v only supports camera control (camera_control, simple only) when mode is pro and duration is 5 seconds
Authentication
authorization string required
All APIs require authentication via Bearer Token.
Get API Key:
Visit API Key Management Page to get your API Key.
Usage:
Add to request header:
Authorization: Bearer YOUR_API_KEY
Parameters
model string required
Model ID to use for the request
Options: kirin_v1_5_i2v
data object required
Data parameter object
image
stringReference image
Supports Base64 encoded image or image URL (ensure accessible)
Note: If using Base64, ensure all image data parameters use Base64 encoding format. Do not add any prefix such as
data:image/png;base64,before the Base64 string. The correct format should be the Base64 encoded string directly.Image requirements:
Format:.jpg,.jpeg,.png
Size: Less than10MB
Dimensions: Width and height at least300px, aspect ratio between1:2.5and2.5:1Either
imageorimage_tailmust be provided, both cannot be emptyimage + image_tail parameters, dynamic_masks/static_mask parameters, and camera_control parameters are mutually exclusive
image_tail
stringReference image - tail frame control
Supports Base64 encoded image or image URL (ensure accessible)
Note: If using Base64, ensure all image data parameters use Base64 encoding format. Do not add any prefix such as
data:image/png;base64,before the Base64 string. The correct format should be the Base64 encoded string directly.Image requirements:
Format:.jpg,.jpeg,.png
Size: Less than10MB
Dimensions: Width and height at least300pxEither
imageorimage_tailmust be provided, both cannot be emptyimage + image_tail parameters, dynamic_masks/static_mask parameters, and camera_control parameters are mutually exclusive
prompt
stringVideo generation prompt, maximum
2500characters
duration
stringVideo duration
Options:
5,10Default:
5
cfg_scale
numberGeneration freedom level. Higher values mean less model freedom and stronger correlation with user prompt
Range:
0-1Default:
0.5
seed
integerRandom seed
negative_prompt
stringNegative text prompt, maximum
2500characters
mode
stringVideo generation mode
std: Standard mode, basic mode with high cost-effectiveness
pro: Expert mode (high quality), high performance mode with better video qualityOptions:
std,proDefault:
std
static_mask
stringStatic brush mask area (mask image painted by user through motion brush)
“Motion brush” capability includes two types: “dynamic brush dynamic_masks” and “static brush static_mask”
Supports Base64 encoded image or image URL (ensure accessible, format requirements same as image field)
Image format supports
.jpg,.jpeg,.pngImage aspect ratio must match the input image (i.e., image field), otherwise the task will fail
static_mask and dynamic_masks.mask must have the same resolution, otherwise the task will fail
dynamic_masks
arrayDynamic brush configuration list
Can configure multiple groups (up to 6 groups), each group contains “mask area” and “trajectories” sequence
mask
stringDynamic brush mask area (mask image painted by user through motion brush)
Supports Base64 encoded image or image URL (ensure accessible, format requirements same as image field)
Image format supports
.jpg,.jpeg,.pngImage aspect ratio must match the input image (i.e., image field), otherwise the task will fail
static_mask and dynamic_masks.mask must have the same resolution, otherwise the task will fail
trajectories
arrayMotion trajectory coordinate sequence
For generating 5s video, trajectory length cannot exceed 77, i.e., coordinate count range:
[2, 77]Trajectory coordinate system uses the bottom-left corner of the image as the origin
Note 1: More coordinate points provide more accurate trajectory depiction. With only 2 trajectory points, it will be a straight line connecting them
Note 2: Trajectory direction follows the input order. The first coordinate is the starting point, connecting subsequent coordinates to form the motion trajectory
x
integerTrajectory point x-coordinate (pixel coordinate with image bottom-left as origin)
y
integerTrajectory point y-coordinate (pixel coordinate with image bottom-left as origin)
camera_control
objectProtocol for controlling camera movement (if not specified, model will intelligently match based on input text/image)
image + image_tail parameters, dynamic_masks/static_mask parameters, and camera_control parameters are mutually exclusive
type
stringPredefined camera movement type
Options:
simple
simple: Simple camera movement, choose one of six in “config”config
objectContains six fields for specifying camera movement or changes in different directions
Required when camera movement type is specified as simple
Choose 1 of the 6 parameters below, i.e., only one parameter can be non-zero, others must be 0
horizontal
numberHorizontal movement, controls camera movement in horizontal direction (translation along x-axis)
Range:
[-10, 10]Negative values indicate leftward translation, positive values indicate rightward translation
vertical
numberVertical movement, controls camera movement in vertical direction (translation along y-axis)
Range:
[-10, 10]Negative values indicate downward translation, positive values indicate upward translation
pan
numberHorizontal pan, controls camera rotation in horizontal plane (rotation around y-axis)
Range:
[-10, 10]Negative values indicate leftward rotation around y-axis, positive values indicate rightward rotation
tilt
numberVertical tilt, controls camera rotation in vertical plane (rotation along x-axis)
Range:
[-10, 10]Negative values indicate downward rotation around x-axis, positive values indicate upward rotation
roll
numberRoll movement, controls camera roll amount (rotation around z-axis)
Range:
[-10, 10]Negative values indicate counterclockwise rotation around z-axis, positive values indicate clockwise rotation
zoom
numberZoom, controls camera focal length change, affecting field of view distance
Range:
[-10, 10]Negative values indicate longer focal length and smaller field of view, positive values indicate shorter focal length and larger field of view
watermark_info
stringWhether to generate results with watermark
Defined by enabled parameter, specific array format as follows:
"watermark_info": { "enabled": boolean // true to generate, false to not generate }Custom watermarks are not currently supported
callback_url
stringCallback URL for task result notification. If configured, the server will actively notify when task status changes
external_task_id
stringCustom task ID
User-defined task ID, will not override the system-generated task ID, but supports querying tasks through this ID
Please note, uniqueness must be ensured for a single user
Polling
Since video generation takes time, you need to poll the task status after creation
The initial response returns the task ID and initial status. The actual generation results must be obtained through polling the task status endpoint
Response Format
error object
Error information, only present when status is failed
code
stringError code
error_message
stringDetailed error message
output array
Generation results, only present when status is completed
content
arrayList of generated content
type
stringResource type, e.g.,
videourl
stringGenerated content URL
usage object
Usage statistics, only present when status is completed
cost
stringTotal cost in USD
discount
numberDiscount amount
metadata object
Metadata information
Error Codes
| Error Code | Description |
|---|---|
| 00200301 | Image missing |
| 00200302 | Image format invalid |
| 00200303 | Prompt length invalid |
| 00200304 | Duration invalid |
| 00200305 | Aspect ratio invalid |
| 00200306 | Authentication failed |
| 00200398 | Generation failed |
| 00200399 | Service unavailable |