单张图片

大部分视频模型都支持图生视频的功能,和以图生图类似,你可以通过在请求参数传入图片链接来实现基于该图片生成视频的功能:
curl --location 'https://geekai.co/api/v1/videos/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {YOUR_GEEKAI_API_KEY}' \
--data '{
    "model":"kling-v1-6",
    "prompt":"让富春山居图动起来",
    "image":"https://static.geekai.co/image/2025/04/02/79b4256e75137022ddd80f3fc21b5d35.png",
    "async": true
}'
目前支持图生视频的模型有:Veo系列视频模型(Veo3仅高可用及以上渠道支持图生视频)、即梦3视频模型、可灵系列视频模型、Stable Video、CogVideoX 系列视频模型。
图生视频耗时比文生视频更长,建议通过异步方式生成,即将 async 参数设置为 true,然后将响应中获取到的 task_id 字段值填充到下面的查询接口 URL 来轮询视频生成状态,直到任务状态为 succeed,并获取到视频生成结果 URL:
curl --location --request GET 'https://geekai.co/api/v1/video/{task_id}/result' \
--header 'Authorization: Bearer {YOUR_GEEKAI_API_KEY}' 

首尾帧

有些视频模型支持首尾帧的功能,你可以通过在请求参数传入首尾帧图片链接来实现基于该图片生成视频的功能:
curl --location 'https://geekai.co/api/v1/videos/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {YOUR_GEEKAI_API_KEY}' \
--data '{
    "model":"veo-2.0-generate-001",
    "prompt":"根据下面的首尾帧图片生成一段大黄蜂从汽车变成机器人的视频",
    "image":"https://static.geekai.co/storage/2025/07/04/ec7eae8d6f4540a6b02b027ff8bc7a70.jpeg",
    "image_tail":"https://static.geekai.co/storage/2025/07/04/20250704145107.jpg",
    "async": true
}'
目前支持首尾帧的视频生成模型有:veo-2.0-generate-001 以及可灵视频生成模型。

多张图片

如果你希望通过传入更多图片来生成视频,可以通过传递图片链接列表到视频生成接口的 image 参数来实现:
curl --location 'https://geekai.co/api/v1/videos/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {YOUR_GEEKAI_API_KEY}' \
--data '{
    "model":"veo-2.0-generate-001",
    "prompt":"生成一段让图片1中的猫抓图片2中的蝴蝶的视频",
    "image":["https://static.geekai.co/image/2025/07/02/2d915923d2904e1e816c684d99abdc17.jpg","https://static.geekai.co/image/2025/07/03/9c020196e343992413ffe120bf120438.png"],
    "async": true
}'
是否支持多图以官方模型参数说明为准。