POST
/
kling
/
v1
/
videos
/
image2video
curl -X POST "https://api.applerouter.ai/kling/v1/videos/image2video" \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-v1",
    "prompt": "The person turns around and walks away",
    "image": "https://example.com/person.jpg",
    "duration": 5,
    "width": 1280,
    "height": 720
  }'
{
  "task_id": "task-abc123",
  "status": "queued"
}

Overview

Animate images using Kling models, generating videos from text prompts and static images.
model
string
required
Kling Model ID (e.g. kling-v1, kling-v1-5)
prompt
string
required
Text description of the desired animation
image
string
required
Source image URL or Base64 encoded image
duration
number
Video Duration (seconds)
width
integer
Output Video Width
height
integer
Output Video Height
curl -X POST "https://api.applerouter.ai/kling/v1/videos/image2video" \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-v1",
    "prompt": "The person turns around and walks away",
    "image": "https://example.com/person.jpg",
    "duration": 5,
    "width": 1280,
    "height": 720
  }'
{
  "task_id": "task-abc123",
  "status": "queued"
}

Check Status

Use GET /kling/v1/videos/image2video/{task_id} to check task status.

Authorizations

Authorization
string
header
required

使用 Bearer Token 认证。格式: Authorization: Bearer sk-xxxxxx

Body

application/json

视频生成请求

model
string

模型/风格 ID

Example:

"kling-v1"

prompt
string

文本描述提示词

Example:

"宇航员站起身走了"

image
string

图片输入 (URL 或 Base64)

Example:

"https://example.com/image.jpg"

duration
number

视频时长(秒)

Example:

5

width
integer

视频宽度

Example:

1280

height
integer

视频高度

Example:

720

fps
integer

视频帧率

Example:

30

seed
integer

随机种子

Example:

20231234

n
integer

生成视频数量

Example:

1

response_format
string

响应格式

Example:

"url"

user
string

用户标识

Example:

"user-1234"

metadata
object

扩展参数 (如 negative_prompt, style, quality_level 等)

Response

成功创建视频生成任务

视频生成任务提交响应

task_id
string

任务 ID

Example:

"abcd1234efgh"

status
string

任务状态

Example:

"queued"