OpenAPI 参考
Modelink API · 视频
Modelink 视频生成 API,涵盖 OpenAI 风格、Fal 队列、可灵、豆包 Seedance、Vidu、Veo 等多厂商的文生视频、图生视频与任务查询能力。Fal 格式接口使用 Authorization: Key {api_key};其他接口使用 Bearer 鉴权。
版本 1.0.0
文生视频
v2.6 text-to-video 仅支持 pro mode。
认证方式
Fal 格式接口鉴权方式:Authorization: Key {api_key}。
路径参数
- Name
- mode
- Type
- enum, 必填
- Description
仅支持 pro。
查询参数
- Name
- fal_webhook
- Type
- string<uri>
- Description
可选。任务状态变化时接收 FAL 格式回调的 HTTPS 地址。详见 FAL 格式 Webhook。
请求体
请求体属性
- promptstring, 必填
视频内容提示词,必填,最长 2500 个字符。
- negative_promptstring
负向提示词,用于描述不希望出现的内容。默认
blur, distort, and low quality。default: blur, distort, and low quality
510
16:99:161:1
- cfg_scalenumber
提示词遵循强度,数值越大越贴近提示词。默认 0.5。
default: 0.5; minimum: 0; maximum: 1
- generate_audioboolean
是否生成原生音频。默认 true;支持中英文语音,其他语言会自动翻译为英文。
default: true
请求
curl 'https://api.qnaigc.com/queue/fal-ai/kling-video/v2.6/{mode}/text-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": "Old friends reuniting at a train station after 20 years, one exclaims '\''Is that really you?!'\'' other tearfully replies '\''I promised I'\''d come back, didn'\''t I?'\'', train whistle, steam hissing, emotional orchestral swell, crowd murmur"
}'响应
任务已入队。
响应体属性
- 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"
}
]
}图生视频
v2.6 image-to-video 仅支持 pro mode。
认证方式
Fal 格式接口鉴权方式:Authorization: Key {api_key}。
路径参数
- Name
- mode
- Type
- enum, 必填
- Description
仅支持 pro。
查询参数
- Name
- fal_webhook
- Type
- string<uri>
- Description
可选。任务状态变化时接收 FAL 格式回调的 HTTPS 地址。详见 FAL 格式 Webhook。
请求体
请求体属性
- promptstring, 必填
视频内容提示词,必填,最长 2500 个字符。
- start_image_urlstring<uri>, 必填
视频首帧参考图 URL,必填。
- end_image_urlstring<uri>
可选的视频尾帧参考图 URL。
- negative_promptstring
负向提示词,用于描述不希望出现的内容。默认
blur, distort, and low quality。default: blur, distort, and low quality
510
- generate_audioboolean
是否生成原生音频。默认 true;支持中英文语音,其他语言会自动翻译为英文。
default: true
- voice_idsstring[]
可选的声音 ID,最多 2 个。在提示词中使用 <<<voice_1>>> 和 <<<voice_2>>> 引用。
请求
curl 'https://api.qnaigc.com/queue/fal-ai/kling-video/v2.6/{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": "A king walks slowly and says \"My people, here I am! I am here to save you all\"",
"start_image_url": "https://v3b.fal.media/files/b/0a84ab29/BSJXz9Ht-jgRgMf4IGxLU_upscaled.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"
}
]
}动作控制
v2.6 motion-control 支持 standard/pro。
认证方式
Fal 格式接口鉴权方式:Authorization: Key {api_key}。
路径参数
- Name
- mode
- Type
- enum, 必填
- Description
支持 standard/pro。
查询参数
- Name
- fal_webhook
- Type
- string<uri>
- Description
可选。任务状态变化时接收 FAL 格式回调的 HTTPS 地址。详见 FAL 格式 Webhook。
请求体
请求体属性
- promptstring
可选的动作与画面补充提示词,最长 2500 个字符。
- image_urlstring<uri>, 必填
角色参考图 URL,必填。角色身体比例应清晰、无遮挡,且主体面积应大于画面的 5%。
- video_urlstring<uri>, 必填
动作参考视频 URL,必填。视频应包含无遮挡的真人全身或上半身(含头部);character_orientation=image 时最长 10 秒,video 时最长 30 秒。
imagevideo
- keep_original_soundboolean
是否保留动作参考视频的原始声音。默认 true。
default: true
请求
curl 'https://api.qnaigc.com/queue/fal-ai/kling-video/v2.6/{mode}/motion-control?fal_webhook={fal_webhook}' \
--request POST \
--header 'Authorization: YOUR_FAL_API_KEY_AUTH' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"image_url": "https://v3b.fal.media/files/b/0a90ffa7/TNErq9yD7ZxGRATjfAqnh_EIgJSN67.png",
"video_url": "https://v3b.fal.media/files/b/0a90ff92/hklvF__w53diz6Rve7f5__JuDW2xl0mr6sJ_Kjz3Vxe_vidoeook%20(1)_1.mp4",
"character_orientation": "image"
}'响应
任务已入队。
响应体属性
- 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"
}
]
}