curl --request POST \
--url https://openapi.imini.ai/imini/router/v1/videos/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kling/kling-v3",
"resolution": "720P",
"aspect_ratio": "9:16",
"duration": 8,
"generate_audio": true,
"extra_params": {
"multi_shot": true,
"shot_type": "customize",
"multi_prompt": [
{
"index": 1,
"prompt": "Two friends talking under a streetlight at night. Warm glow, casual poses, no dialogue.",
"duration": "2"
},
{
"index": 2,
"prompt": "A runner sprinting through a forest, leaves flying. Low-angle shot, focus on movement.",
"duration": "3"
},
{
"index": 3,
"prompt": "A woman hugging a cat, smiling. Soft sunlight, cozy home setting, emphasize warmth.",
"duration": "3"
}
]
}
}
'
{
"task_id": "task_2042864638838083584",
"model": "kling/kling-v3",
"created_at": "2026-04-11T07:17:39.146Z",
"request_id": "291a4117-9df8-4349-aee1-bdf8ffcacb9a"
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "prompt exceeds max length 2500",
"status": 400,
"request_id": "req_abc123"
}
}视频模型 API
Kling v3
可灵 3.0 视频生成模型,支持文生视频、图生视频、首尾帧补齐、多参考图生视频
POST
/
v1
/
videos
/
generate
curl --request POST \
--url https://openapi.imini.ai/imini/router/v1/videos/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kling/kling-v3",
"resolution": "720P",
"aspect_ratio": "9:16",
"duration": 8,
"generate_audio": true,
"extra_params": {
"multi_shot": true,
"shot_type": "customize",
"multi_prompt": [
{
"index": 1,
"prompt": "Two friends talking under a streetlight at night. Warm glow, casual poses, no dialogue.",
"duration": "2"
},
{
"index": 2,
"prompt": "A runner sprinting through a forest, leaves flying. Low-angle shot, focus on movement.",
"duration": "3"
},
{
"index": 3,
"prompt": "A woman hugging a cat, smiling. Soft sunlight, cozy home setting, emphasize warmth.",
"duration": "3"
}
]
}
}
'
{
"task_id": "task_2042864638838083584",
"model": "kling/kling-v3",
"created_at": "2026-04-11T07:17:39.146Z",
"request_id": "291a4117-9df8-4349-aee1-bdf8ffcacb9a"
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "prompt exceeds max length 2500",
"status": 400,
"request_id": "req_abc123"
}
}授权
在请求 Header 中传入 Authorization: Bearer <YOUR_API_KEY>。前往 API Keys 管理页 创建和管理 API Key。
请求体
application/json
固定值 kling/kling-v3
提示词,不超过 2500 字符。
开启
extra_params.multi_shot分镜模式时可为空,分镜词由extra_params.multi_prompt提供。
示例:
"A cinematic shot of an orange cat stretching slowly under cherry blossoms, warm sunlight"
输出分辨率,默认 720P。
可用选项:
720P, 1080P 输出宽高比,默认 16:9。
可用选项:
16:9, 9:16, 1:1 视频时长(秒),默认 5,取值范围 3 ~ 15。
必填范围:
3 <= x <= 15是否生成声音,默认 false。
参考图列表,最多 4 张。为空时为文生视频,否则按 reference_type 组合决定输入模式:
- 图生视频:1 张
first_frame - 首尾帧生视频:1 张
first_frame+ 1 张last_frame - 多参考图生视频:最多 4 张
asset
图片约束(每张都需满足):
- 格式:
jpg/jpeg/png - 文件大小:≤ 10 MB
- 尺寸:宽、高均 ≥ 200 px
- 宽高比:1:2.5 ~ 2.5:1
Maximum array length:
4Show child attributes
Show child attributes
可灵官方扩展参数,全部选填。
Show child attributes
Show child attributes

