curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gemini-omni-1.2-flash",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A cinematic night city with neon reflections and a slow camera push-in",
"resolution": "720p",
"duration": 8,
"aspect_ratio": "16:9"
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2023-11-07T05:31:56Z"
},
"message": "success"
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}Google
Gemini Omni 1.2 Flash
Gemini Omni 1.2 Flash API 可根据文本、首尾帧或参考图与参考视频生成 360p 至 4K、时长 3–15 秒的视频,也可编辑 15 秒以内的已有视频。
POST
/
api
/
generate
/
submit
curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gemini-omni-1.2-flash",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A cinematic night city with neon reflections and a slow camera push-in",
"resolution": "720p",
"duration": 8,
"aspect_ratio": "16:9"
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2023-11-07T05:31:56Z"
},
"message": "success"
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}- 提交后会返回
task_id。如果提供了callback_url,当任务状态变为finished或failed时,系统会向callback_url发送 POST 请求。 - 无论是否提供
callback_url,都可以通过统一的查询任务状态接口获取结果。
gemini-omni-1.2-flash 可根据文本提示词、首尾帧或参考图与参考视频生成视频,也可以用文字指令编辑已有视频。适合产品广告、社媒短视频、分镜镜头,以及对已有素材重新风格化。
模型
- gemini-omni-1.2-flash - 文生视频、首尾帧生成、参考图与参考视频生成、视频编辑
功能
- 输出时长
3到15秒,按秒设置 - 输出分辨率
360p、720p、1080p和4k,支持16:9横屏和9:16竖屏 - 单次请求最多
10张参考图和3段参考视频 - 用文字指令编辑
15秒以内的已有视频
输入模式
按传入的字段依次判断模式:- 视频编辑:发送
video_url。只能同时发送prompt和resolution,输出时长与源视频一致 - 参考生成:发送
reference_image_urls、reference_video_urls,或两者同时发送 - 首尾帧视频:在
image_urls中发送一到两张图片 - 文生视频:只发送
prompt和可选的生成设置
必填参数
- prompt:描述场景、运动、风格和镜头行为的文本提示词;传入
video_url时为编辑指令。最长20,000个字符
可选参数
- image_urls:首帧和可选尾帧的图片 URL 数组。最多允许
2张图片 - reference_image_urls:参考图 URL 数组。最多允许
10张图片 - reference_video_urls:参考视频 URL 数组。最多允许
3段视频,每段不超过15秒 - video_url:待编辑视频的 URL。视频时长不超过
15秒 - duration:
3到15之间的整数秒。默认为8。传入尾帧时最多10秒。视频编辑不支持该字段 - resolution:
360p、720p、1080p或4k。默认为720p - aspect_ratio:
16:9或9:16。默认为16:9。视频编辑不支持该字段 - callback_url:可选的 Webhook URL,用于接收完成通知
示例
文生视频
{
"model": "gemini-omni-1.2-flash",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A cinematic night city with neon reflections and a slow camera push-in",
"resolution": "720p",
"duration": 8,
"aspect_ratio": "16:9"
}
}
首尾帧
{
"model": "gemini-omni-1.2-flash",
"input": {
"prompt": "Create a smooth cinematic transition between the two frames",
"image_urls": [
"https://example.com/first-frame.webp",
"https://example.com/last-frame.webp"
],
"resolution": "1080p",
"duration": 8,
"aspect_ratio": "16:9"
}
}
参考图与参考视频
{
"model": "gemini-omni-1.2-flash",
"input": {
"prompt": "Follow the motion of the reference video while applying the visual style of the image",
"reference_image_urls": ["https://example.com/style.webp"],
"reference_video_urls": ["https://example.com/motion.mp4"],
"resolution": "720p",
"duration": 8,
"aspect_ratio": "16:9"
}
}
视频编辑
{
"model": "gemini-omni-1.2-flash",
"input": {
"prompt": "Turn the scene into a watercolor painting while keeping the camera movement",
"video_url": "https://example.com/source.mp4",
"resolution": "720p"
}
}
注意事项
image_urls不能与reference_image_urls或reference_video_urls同时使用video_url不能与image_urls、reference_image_urls、reference_video_urls、duration或aspect_ratio同时使用- 参考图和参考视频可以在同一次请求中同时发送
- 媒体 URL 必须是可公开访问的 HTTP 或 HTTPS 链接
- 参考视频或源视频超过
15秒时请求会被拒绝 - 响应会返回
task_id;查询任务状态即可获取生成的视频文件
授权
所有 API 接口都需要 Bearer Token 认证。
创建 API Key:登录 PoYo,进入 仪表盘 → API 密钥(poyo.ai/zh/dashboard/api-key),点击创建 Key。
在请求头中添加:
Authorization: Bearer YOUR_API_KEY
请求体
application/json
响应
任务提交成功
Show child attributes
Show child attributes
示例:
"success"