Skip to content

Gemini Moni(首帧生视频) ​

任务进度与结果查询见 使用说明。

说明 ​

异步任务接口,用于提交 Gemini Moni 首帧生视频任务。请求必须通过 start_frame 传入一张首帧图片,服务会以该图片作为视频固定首帧。

请求地址 ​

http
POST /open/v1/ai_creation/task/submit
http
access_token: {{access_token}}
Content-Type: application/json

请求参数 Body ​

json
{
  "start_frame": "https://res.chanjing.cc/chanjing/res/aigc_creation/photo/start.jpg",
  "ref_prompt": "商品从首帧开始缓慢旋转,镜头逐渐推进,背景光影自然流动",
  "creation_type": 4,
  "aspect_ratio": "9:16",
  "clarity": 1080,
  "video_duration": 5,
  "number_of_images": 1,
  "model_code": "gemini-moni-first-frame-to-video"
}

参数说明

字段类型是否必传示例说明
start_framestring是https://.../start.jpg首帧图片 URL;该模式只支持 1 张图片
ref_promptstring是商品从首帧开始缓慢旋转视频生成提示词,最多 20000 个字符
creation_typeint是4创作类型,固定为 4
aspect_ratiostring是9:16输出视频宽高比,支持 16:9、9:16
clarityint是1080输出清晰度,支持 720、1080、1440、2160,分别对应 720P、1080P、2K、4K
video_durationint是5输出视频时长(秒),支持 3-10 的整数
number_of_imagesint是1OpenAPI 单次生成数量,固定为 1
model_codestring是gemini-moni-first-frame-to-video模型编码,固定为 gemini-moni-first-frame-to-video

首帧图片支持 JPEG、JPG、PNG、WebP、BMP、TIFF、GIF,单张不超过 30 MB;宽、高均为 300-6000 像素,宽高比为 0.4-2.5。

该模式不支持尾帧、视频或音频素材,请勿传入 end_frame。新接入请固定使用 start_frame,不要将首帧作为普通 ref_resources 参考图提交。

Gemini Moni 不支持 resolution_mode,请勿传入。生成音频和提示词增强策略由服务端统一配置,不提供 OpenAPI 参数。

模型按输出清晰度和视频时长计费,实际价格请通过蝉镜 AIGC 价格计算器查询。

响应示例 ​

json
{
  "trace_id": "96afa792520b0e6a86d72e89435bc0a7",
  "code": 0,
  "msg": "success",
  "data": "a60747d7-dc05-4afc-b2ef-ee4370ed53c6"
}

响应字段说明 ​

字段说明
code响应状态码
msg响应信息
trace_id请求链路追踪 ID
data创作任务唯一 ID(unique_id)

响应状态码说明 ​

code说明
0响应成功
400传入参数格式错误
10400AccessToken 验证失败
40000参数错误
40001超出 QPS 限制
50000系统内部错误

示例代码 ​

shell
curl --location --request POST 'https://open-api.chanjing.cc/open/v1/ai_creation/task/submit' \
--header 'access_token: {{access_token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "start_frame": "https://res.chanjing.cc/chanjing/res/aigc_creation/photo/start.jpg",
  "ref_prompt": "商品从首帧开始缓慢旋转,镜头逐渐推进,背景光影自然流动",
  "creation_type": 4,
  "aspect_ratio": "9:16",
  "clarity": 1080,
  "video_duration": 5,
  "number_of_images": 1,
  "model_code": "gemini-moni-first-frame-to-video"
}'
go
payload := strings.NewReader(`{
  "start_frame": "https://res.chanjing.cc/chanjing/res/aigc_creation/photo/start.jpg",
  "ref_prompt": "商品从首帧开始缓慢旋转,镜头逐渐推进,背景光影自然流动",
  "creation_type": 4,
  "aspect_ratio": "9:16",
  "clarity": 1080,
  "video_duration": 5,
  "number_of_images": 1,
  "model_code": "gemini-moni-first-frame-to-video"
}`)
java
RequestBody body = RequestBody.create(mediaType, "{\n  \"start_frame\": \"https://res.chanjing.cc/chanjing/res/aigc_creation/photo/start.jpg\",\n  \"ref_prompt\": \"商品从首帧开始缓慢旋转,镜头逐渐推进,背景光影自然流动\",\n  \"creation_type\": 4,\n  \"aspect_ratio\": \"9:16\",\n  \"clarity\": 1080,\n  \"video_duration\": 5,\n  \"number_of_images\": 1,\n  \"model_code\": \"gemini-moni-first-frame-to-video\"\n}");
py
payload = json.dumps({
  "start_frame": "https://res.chanjing.cc/chanjing/res/aigc_creation/photo/start.jpg",
  "ref_prompt": "商品从首帧开始缓慢旋转,镜头逐渐推进,背景光影自然流动",
  "creation_type": 4,
  "aspect_ratio": "9:16",
  "clarity": 1080,
  "video_duration": 5,
  "number_of_images": 1,
  "model_code": "gemini-moni-first-frame-to-video"
})