OpenAPI 参考
Modelink API · 视频
Modelink 视频生成 API,涵盖 OpenAI 风格、Fal 队列、可灵、豆包 Seedance、Vidu、Veo 等多厂商的文生视频、图生视频与任务查询能力。Fal 格式接口使用 Authorization: Key {api_key};其他接口使用 Bearer 鉴权。
版本 1.0.0
图生视频
o1 image-to-video 支持 standard/pro,不支持 4k;pro 也兼容 /queue/fal-ai/kling-video/o1/image-to-video 省略 mode 路径。
认证方式
Fal 格式接口鉴权方式:Authorization: Key {api_key}。
路径参数
- Name
- mode
- Type
- enum, 必填
- Description
o1 支持 standard/pro,不支持 4k。
查询参数
- Name
- fal_webhook
- Type
- string<uri>
- Description
可选。任务状态变化时接收 FAL 格式回调的 HTTPS 地址。详见 FAL 格式 Webhook。
请求体
请求体属性
- promptstring, 必填
视频内容提示词,必填。可使用 @Image1 引用首帧、@Image2 引用尾帧。
- start_image_urlstring<uri>, 必填
视频首帧图像 URL,必填。图片不超过 10MB,宽高均不少于 300px,宽高比为 1:2.5~2.5:1。
- end_image_urlstring<uri>
可选的视频尾帧图像 URL。
345678910
- oneOf[0]string可选。
- oneOf[1]integer<int64>可选。
- frontal_image_urlstring, 必填
主体正面图 URL(必填),需公网可访问并通过 SSRF 白名单。
- reference_image_urlsstring[]
其他角度参考图 URL 列表(选填),0~3 张。
请求
curl 'https://api.qnaigc.com/queue/fal-ai/kling-video/o1/{mode}/image-to-video?fal_webhook={fal_webhook}' \
--request POST \
--header 'Authorization: YOUR_FAL_API_KEY_AUTH' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "Create a magical timelapse transition. The snow melts rapidly to reveal green grass, and the tree branches burst into bloom with pink flowers in real-time. The lighting shifts from cold winter light to warm spring sunshine. The camera pushes in slowly towards the tree. Disney-style magical transformation, cinematic, 8k.",
"start_image_url": "https://v3b.fal.media/files/b/rabbit/NaslJIC7F2WodS6DFZRRJ.png"
}'响应
任务已入队。
响应体属性
- request_idstring, 必填
任务唯一标识符。
- response_urlstring, 必填
获取结果的完整 URL。
- status_urlstring, 必填
查询状态的完整 URL。
- cancel_urlstring
取消任务的 URL(暂不支持)。
IN_QUEUE
- queue_positioninteger
队列位置(入队时为 0)。
- messagestring可选。
STDERRSTDOUTERRORINFOWARNDEBUG
- sourcestring可选。
- timestampstring<date-time>
ISO 8601 格式。
响应
{
"request_id": "string",
"response_url": "string",
"status_url": "string",
"cancel_url": "string",
"status": "IN_QUEUE",
"queue_position": 42,
"logs": [
{
"message": "string",
"level": "STDERR",
"source": "string",
"timestamp": "string"
}
]
}参考生视频
o1 reference-to-video 支持 standard/pro,不支持 4k;pro 也兼容 /queue/fal-ai/kling-video/o1/reference-to-video 省略 mode 路径。
认证方式
Fal 格式接口鉴权方式:Authorization: Key {api_key}。
路径参数
- Name
- mode
- Type
- enum, 必填
- Description
o1 支持 standard/pro,不支持 4k。
查询参数
- Name
- fal_webhook
- Type
- string<uri>
- Description
可选。任务状态变化时接收 FAL 格式回调的 HTTPS 地址。详见 FAL 格式 Webhook。
请求体
请求体属性
- promptstring, 必填
视频内容提示词,必填。使用 @Image1、@Element1 等按顺序引用参考图片和主体。
- image_urlsstring[]
风格或外观参考图 URL 列表,在提示词中按 @Image1、@Image2 顺序引用。与 elements 合计最多 7 项。
- oneOf[0]string可选。
- oneOf[1]integer<int64>可选。
- frontal_image_urlstring, 必填
主体正面图 URL(必填),需公网可访问并通过 SSRF 白名单。
- reference_image_urlsstring[]
其他角度参考图 URL 列表(选填),0~3 张。
345678910
16:99:161:1
请求
curl 'https://api.qnaigc.com/queue/fal-ai/kling-video/o1/{mode}/reference-to-video?fal_webhook={fal_webhook}' \
--request POST \
--header 'Authorization: YOUR_FAL_API_KEY_AUTH' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "Create a magical timelapse transition. The snow melts rapidly to reveal green grass, and the tree branches burst into bloom with pink flowers in real-time. The lighting shifts from cold winter light to warm spring sunshine. The camera pushes in slowly towards the tree. Disney-style magical transformation, cinematic, 8k.",
"image_urls": [
"https://v3.fal.media/files/panda/HnY2yf-BbzlrVQxR-qP6m_9912d0932988453aadf3912fc1901f52.jpg"
]
}'响应
任务已入队。
响应体属性
- request_idstring, 必填
任务唯一标识符。
- response_urlstring, 必填
获取结果的完整 URL。
- status_urlstring, 必填
查询状态的完整 URL。
- cancel_urlstring
取消任务的 URL(暂不支持)。
IN_QUEUE
- queue_positioninteger
队列位置(入队时为 0)。
- messagestring可选。
STDERRSTDOUTERRORINFOWARNDEBUG
- sourcestring可选。
- timestampstring<date-time>
ISO 8601 格式。
响应
{
"request_id": "string",
"response_url": "string",
"status_url": "string",
"cancel_url": "string",
"status": "IN_QUEUE",
"queue_position": 42,
"logs": [
{
"message": "string",
"level": "STDERR",
"source": "string",
"timestamp": "string"
}
]
}文生视频
根据文字提示生成视频,支持风格参考图(image_urls)和主体参考(elements)。
注意: mode 仅支持 std/standard/pro,不支持 4k。
认证方式
Fal 格式接口鉴权方式:Authorization: Key {api_key}。
路径参数
- Name
- mode
- Type
- enum, 必填
- Description
分辨率档位(不支持 4k):
std/standard= 720P,pro= 1080P。
请求体
请求体属性
- promptstring
视频生成提示词,最多 2500 字符
- image_urlsstring[]
风格参考图片 URL 列表(可选,≤7 张,每张≤10MB)
- oneOf[0]string可选。
- oneOf[1]integer<int64>可选。
- frontal_image_urlstring, 必填
主体正面图 URL(必填),需公网可访问并通过 SSRF 白名单。
- reference_image_urlsstring[]
其他角度参考图 URL 列表(选填),0~3 张。
510
16:99:161:1
请求
curl https://api.qnaigc.com/queue/fal-ai/kling-video/o1/{mode}/text-to-video \
--request POST \
--header 'Authorization: YOUR_FAL_API_KEY_AUTH' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "在星空下的草原上,萤火虫点点闪烁",
"duration": "5",
"aspect_ratio": "16:9"
}'响应
任务提交成功
响应体属性
- request_idstring, 必填
任务唯一标识符。
- response_urlstring, 必填
获取结果的完整 URL。
- status_urlstring, 必填
查询状态的完整 URL。
- cancel_urlstring
取消任务的 URL(暂不支持)。
IN_QUEUE
- queue_positioninteger
队列位置(入队时为 0)。
- messagestring可选。
STDERRSTDOUTERRORINFOWARNDEBUG
- sourcestring可选。
- timestampstring<date-time>
ISO 8601 格式。
响应
{
"request_id": "string",
"response_url": "string",
"status_url": "string",
"cancel_url": "string",
"status": "IN_QUEUE",
"queue_position": 42,
"logs": [
{
"message": "string",
"level": "STDERR",
"source": "string",
"timestamp": "string"
}
]
}视频编辑
对已有视频进行 AI 编辑,例如背景替换、风格迁移等。
注意: mode 仅支持 std/standard/pro,不支持 4k。
认证方式
Fal 格式接口鉴权方式:Authorization: Key {api_key}。
路径参数
- Name
- mode
- Type
- enum, 必填
- Description
分辨率档位(不支持 4k)
请求体
请求体属性
- promptstring, 必填
编辑指令(必填),描述对视频的修改意图
- video_urlstring, 必填
待编辑的原始视频 URL(必填),MP4/MOV,3-10s
- image_urlsstring[]
风格参考图片 URL 列表(可选)
- oneOf[0]string可选。
- oneOf[1]integer<int64>可选。
- frontal_image_urlstring, 必填
主体正面图 URL(必填),需公网可访问并通过 SSRF 白名单。
- reference_image_urlsstring[]
其他角度参考图 URL 列表(选填),0~3 张。
- keep_audioboolean
是否保留原视频音频
请求
curl https://api.qnaigc.com/queue/fal-ai/kling-video/o1/{mode}/video-to-video/edit \
--request POST \
--header 'Authorization: YOUR_FAL_API_KEY_AUTH' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "把背景替换成日落时的沙滩",
"video_url": "https://example.com/original.mp4",
"keep_audio": true
}'响应
任务提交成功
响应体属性
- request_idstring, 必填
任务唯一标识符。
- response_urlstring, 必填
获取结果的完整 URL。
- status_urlstring, 必填
查询状态的完整 URL。
- cancel_urlstring
取消任务的 URL(暂不支持)。
IN_QUEUE
- queue_positioninteger
队列位置(入队时为 0)。
- messagestring可选。
STDERRSTDOUTERRORINFOWARNDEBUG
- sourcestring可选。
- timestampstring<date-time>
ISO 8601 格式。
响应
{
"request_id": "string",
"response_url": "string",
"status_url": "string",
"cancel_url": "string",
"status": "IN_QUEUE",
"queue_position": 42,
"logs": [
{
"message": "string",
"level": "STDERR",
"source": "string",
"timestamp": "string"
}
]
}视频参考生成
以参考视频的动作或镜头语言为基础,生成全新内容的视频。
注意: mode 仅支持 std/standard/pro,不支持 4k。
认证方式
Fal 格式接口鉴权方式:Authorization: Key {api_key}。
路径参数
- Name
- mode
- Type
- enum, 必填
- Description
分辨率档位(不支持 4k)
请求体
请求体属性
- promptstring, 必填
视频生成提示词(必填)
- video_urlstring, 必填
动作/镜头参考视频 URL(必填),MP4/MOV,3-10s
- image_urlsstring[]
风格或主体参考图片 URL 列表(可选)
- oneOf[0]string可选。
- oneOf[1]integer<int64>可选。
- frontal_image_urlstring, 必填
主体正面图 URL(必填),需公网可访问并通过 SSRF 白名单。
- reference_image_urlsstring[]
其他角度参考图 URL 列表(选填),0~3 张。
- keep_audioboolean
是否保留参考视频音频
16:99:161:1
510
请求
curl https://api.qnaigc.com/queue/fal-ai/kling-video/o1/{mode}/video-to-video/reference \
--request POST \
--header 'Authorization: YOUR_FAL_API_KEY_AUTH' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "基于参考视频的运镜方式,展示一片金色麦田",
"video_url": "https://example.com/motion.mp4",
"aspect_ratio": "16:9",
"duration": "5",
"keep_audio": false
}'响应
任务提交成功
响应体属性
- request_idstring, 必填
任务唯一标识符。
- response_urlstring, 必填
获取结果的完整 URL。
- status_urlstring, 必填
查询状态的完整 URL。
- cancel_urlstring
取消任务的 URL(暂不支持)。
IN_QUEUE
- queue_positioninteger
队列位置(入队时为 0)。
- messagestring可选。
STDERRSTDOUTERRORINFOWARNDEBUG
- sourcestring可选。
- timestampstring<date-time>
ISO 8601 格式。
响应
{
"request_id": "string",
"response_url": "string",
"status_url": "string",
"cancel_url": "string",
"status": "IN_QUEUE",
"queue_position": 42,
"logs": [
{
"message": "string",
"level": "STDERR",
"source": "string",
"timestamp": "string"
}
]
}