happyhorse-1.1-r2v

POST /alibailian/api/v1/services/aigc/video-generation/video-synthesis

MethodPOST
Path/alibailian/api/v1/services/aigc/video-generation/video-synthesis
Typehttp
Status1
Module2102810
Folder68175428

概览

MethodPOST
Path/alibailian/api/v1/services/aigc/video-generation/video-synthesis
Typehttp
Status1
Module2102810
Folder68175428

请求体

{
  "type": "application/json",
  "parameters": [],
  "jsonSchema": {
    "type": "object",
    "properties": {
      "model": {
        "type": "string",
        "description": "模型名称。\n\n固定值:happyhorse-1.0-r2v。"
      },
      "input": {
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string",
            "description": "文本提示词。用来描述生成视频中期望包含的元素和视觉特点。\n\n支持任何语言输入,长度不超过5000个非中文字符或2500个中文字符,超过部分会自动截断。\n\n参考指代:在prompt中通过“[Image 1]、[Image 2]”标识指代media数组中对应位置的参考图像,顺序与media数组顺序一致。使用时需要指明参考图中的具体对象,例如“[Image 1]中身着红色旗袍的女性”。"
          },
          "media": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "description": "媒体素材类型。固定值为:\n\nreference_image:参考图像。\n\n素材限制:\n\n参考图像数量:1~9张。"
                },
                "url": {
                  "type": "string",
                  "description": "图像文件的URL地址,必须为公网可访问的URL。\n\n支持 HTTP 或 HTTPS 协议。\n\n示例值:https://xxx/xxx.jpg。\n\n图像限制:\n\n格式:JPEG、JPG、PNG、WEBP。\n\n分辨率:短边不低于400像素,推荐720P以上清晰图。避免传入过小、模糊或压缩过度的图像,影响效果。\n\n文件大小:不超过10MB。"
                }
              },
              "required": [
                "type",
                "url"
              ],
              "x-apifox-orders": [
                "type",
                "url"
              ]
            },
            "description": "媒体素材列表,用于指定参考图像。\n\n数组的每个元素为一个媒体对象,包含 type和 url字段。\n\n按照数组顺序定义prompt中角色引用的顺序。\n\n数组中的第 1 个reference_image对应 [Image 1],第 2 个对应 [Image 2],以此类推。"
          }
        },
        "required": [
          "prompt",
          "media"
        ],
        "x-apifox-orders": [
          "prompt",
          "media"
        ],
        "description": "输入"
      },
      "parameters": {
        "type": "object",
        "properties": {
          "resolution": {
            "type": "string",
            "description": "生成视频的分辨率档位。\n\n可选值:\n\n1080P:默认值。\n\n720P"
          },
          "ratio": {
            "type": "string",
            "description": "生成视频的宽高比。\n\n可选值:\n\n16:9:默认值。\n\n9:16\n\n3:4\n\n4:3\n\n1:1"
          },
          "duration": {
            "type": "integer",
            "description": "生成视频的时长,单位为秒。\n\n取值范围:3~15之间的整数。\n\n默认值:5。"
          },
          "watermark": {
            "type": "boolean",
            "description": "是否在生成的视频上添加水印标识。水印位于视频右下角,文案固定为“Happy Horse”。\n\ntrue:默认值,添加水印。\n\nfalse:不添加水印。"
          }
        },
        "x-apifox-orders": [
          "resolution",
          "ratio",
          "duration",
          "watermark"
        ],
        "description": "参数"
      }
    },
    "required": [
      "model",
      "input"
    ],
    "x-apifox-orders": [
      "model",
      "input",
      "parameters"
    ]
  },
  "required": true,
  "mediaType": "",
  "examples": [
    {
      "mediaType": "application/json",
      "value": "{\r\n    \"model\": \"happyhorse-1.1-r2v\",\r\n    \"input\": {\r\n        \"prompt\": \"[Image 1]中身着红色旗袍的女性,镜头先以侧面中景勾勒旗袍修身剪裁与S型曲线,随即切换至低角度仰拍,捕捉她轻抬玉手展开[Image 2]中的折扇的同时,[Image 3]中的流苏耳坠随头部转动轻盈摆动的细节,最后推近至面部特写,定格在她指尖轻点扇骨、眼波流转间的含蓄风情,多视角全方位展现东方韵味。\",\r\n        \"media\": [\r\n            {\r\n                \"type\": \"reference_image\",\r\n                \"url\": \"https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260424/mvzfud/hh-v2v-girl.jpg\"\r\n            },\r\n            {\r\n                \"type\": \"reference_image\",\r\n                \"url\": \"https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260424/fvuihk/hh-v2v2-folding-fan.jpg\"\r\n            },\r\n            {\r\n                \"type\": \"reference_image\",\r\n                \"url\": \"https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260424/imerii/hh-v2v-earrings.jpg\"\r\n            }\r\n        ]\r\n    },\r\n    \"parameters\": {\r\n        \"resolution\": \"720P\",\r\n        \"ratio\": \"16:9\",\r\n        \"duration\": 5\r\n    }\r\n}"
    }
  ],
  "oasExtensions": ""
}

响应

[
  {
    "id": 176103933,
    "name": "成功",
    "code": 200,
    "contentType": "json",
    "jsonSchema": {
      "type": "object",
      "properties": {
        "request_id": {
          "type": "string"
        },
        "output": {
          "type": "object",
          "properties": {
            "task_id": {
              "type": "string"
            },
            "task_status": {
              "type": "string"
            }
          },
          "required": [
            "task_id",
            "task_status"
          ],
          "x-apifox-orders": [
            "task_id",
            "task_status"
          ]
        }
      },
      "required": [
        "request_id",
        "output"
      ],
      "x-apifox-orders": [
        "request_id",
        "output"
      ]
    },
    "itemSchema": {},
    "description": "",
    "mediaType": "",
    "headers": []
  }
]

响应示例

[
  {
    "name": "成功示例",
    "responseId": 176103933,
    "data": "{\n    \"request_id\": \"1445f928-f1b6-9c43-8143-bfaddb5989cf\",\n    \"output\": {\n        \"task_id\": \"86438901-c911-4bfa-9137-621478c85efd\",\n        \"task_status\": \"PENDING\"\n    }\n}",
    "id": "019e1165-b634-745f-890b-4f5ace75664d"
  }
]