Gemini Moni(全能参考)
任务进度与结果查询见 使用说明。
说明
异步任务接口,用于提交 Gemini Moni 全能参考视频任务。支持纯文本生成,也支持使用图片、视频或图片与视频的组合作为参考素材。
请求地址
http
POST /open/v1/ai_creation/task/submitHeader
http
access_token: {{access_token}}
Content-Type: application/json请求参数 Body
json
{
"ref_resources": [
{
"url": "https://res.chanjing.cc/chanjing/res/aigc_creation/photo/ref.jpg",
"file_type": "image"
},
{
"url": "https://res.chanjing.cc/chanjing/res/aigc_creation/video/ref.mp4",
"file_type": "video"
}
],
"ref_prompt": "保持参考图中的主体特征,参考视频的运镜,生成电影感品牌短片",
"creation_type": 4,
"aspect_ratio": "16:9",
"clarity": 1080,
"video_duration": 5,
"number_of_images": 1,
"model_code": "gemini-moni"
}参数说明
| 字段 | 类型 | 是否必传 | 示例 | 说明 |
|---|---|---|---|---|
| ref_resources | array<object> | 否 | [{"url":"https://.../ref.mp4","file_type":"video"}] | 参考素材列表;不传时为纯文本生成,最多传 7 个素材 |
| ref_resources.url | string | 是 | https://.../ref.mp4 | 可公开访问且能通过服务端校验的参考素材 URL |
| ref_resources.file_type | string | 是 | video | 参考素材类型,仅支持 image、video |
| ref_img_url | array<string> | 否 | ["https://.../ref.jpg"] | 兼容旧版参考图字段;新接入建议使用 ref_resources |
| ref_prompt | string | 是 | 保持参考图中的主体特征 | 视频生成提示词,最多 20000 个字符 |
| creation_type | int | 是 | 4 | 创作类型,固定为 4 |
| aspect_ratio | string | 是 | 16:9 | 输出视频宽高比,支持 16:9、9:16 |
| clarity | int | 是 | 1080 | 输出清晰度,支持 720、1080、1440、2160,分别对应 720P、1080P、2K、4K |
| video_duration | int | 是 | 5 | 输出视频时长(秒),支持 3-10 的整数 |
| number_of_images | int | 是 | 1 | OpenAPI 单次生成数量,固定为 1 |
| model_code | string | 是 | gemini-moni | 模型编码,固定为 gemini-moni |
参考素材限制:
| 素材类型 | 支持格式 | 单文件大小 | 数量上限 | 其他限制 |
|---|---|---|---|---|
| 图片 | JPEG、JPG、PNG、WebP、BMP、TIFF、GIF | 30 MB | 无视频时最多 7 张;有视频时最多 5 张 | 宽、高均为 300-6000 像素;宽高比为 0.4-2.5 |
| 视频 | MP4、MOV | 50 MB | 最多 3 个 | 单个视频最长 3 秒;画面像素总数为 409600-927408 |
图片和视频合计不能超过 7 个,不支持音频参考素材。相同 URL 会合并去重,不重复计数。
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 | 传入参数格式错误 |
| 10400 | AccessToken 验证失败 |
| 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 '{
"ref_resources": [
{"url": "https://res.chanjing.cc/chanjing/res/aigc_creation/photo/ref.jpg", "file_type": "image"},
{"url": "https://res.chanjing.cc/chanjing/res/aigc_creation/video/ref.mp4", "file_type": "video"}
],
"ref_prompt": "保持参考图中的主体特征,参考视频的运镜,生成电影感品牌短片",
"creation_type": 4,
"aspect_ratio": "16:9",
"clarity": 1080,
"video_duration": 5,
"number_of_images": 1,
"model_code": "gemini-moni"
}'go
payload := strings.NewReader(`{
"ref_resources": [
{"url":"https://res.chanjing.cc/chanjing/res/aigc_creation/photo/ref.jpg","file_type":"image"},
{"url":"https://res.chanjing.cc/chanjing/res/aigc_creation/video/ref.mp4","file_type":"video"}
],
"ref_prompt": "保持参考图中的主体特征,参考视频的运镜,生成电影感品牌短片",
"creation_type": 4,
"aspect_ratio": "16:9",
"clarity": 1080,
"video_duration": 5,
"number_of_images": 1,
"model_code": "gemini-moni"
}`)java
RequestBody body = RequestBody.create(mediaType, "{\n \"ref_resources\": [{\"url\":\"https://res.chanjing.cc/chanjing/res/aigc_creation/photo/ref.jpg\",\"file_type\":\"image\"},{\"url\":\"https://res.chanjing.cc/chanjing/res/aigc_creation/video/ref.mp4\",\"file_type\":\"video\"}],\n \"ref_prompt\": \"保持参考图中的主体特征,参考视频的运镜,生成电影感品牌短片\",\n \"creation_type\": 4,\n \"aspect_ratio\": \"16:9\",\n \"clarity\": 1080,\n \"video_duration\": 5,\n \"number_of_images\": 1,\n \"model_code\": \"gemini-moni\"\n}");py
payload = json.dumps({
"ref_resources": [
{"url": "https://res.chanjing.cc/chanjing/res/aigc_creation/photo/ref.jpg", "file_type": "image"},
{"url": "https://res.chanjing.cc/chanjing/res/aigc_creation/video/ref.mp4", "file_type": "video"}
],
"ref_prompt": "保持参考图中的主体特征,参考视频的运镜,生成电影感品牌短片",
"creation_type": 4,
"aspect_ratio": "16:9",
"clarity": 1080,
"video_duration": 5,
"number_of_images": 1,
"model_code": "gemini-moni"
})