众扬汇 AI 开放平台 API 文档

视频换人

OpenAPI Specification

yaml
openapi: 3.0.1
info:
  title: ''
  description: "本页接口说明详见下方接口定义;参数取值与返回以本平台实测为准。"
  version: 1.0.0
paths:
  /qwen/api/v1/services/aigc/image2video/video-synthesis:
    post:
      summary: 视频换人
      deprecated: false
      description: "依据人物图片与参考视频,将视频中的主角替换为图片中的角色,同时保留原视频的场景、光照与色调,实现无缝换人;适用于二次创作、影视后期等角色替换场景。"
      tags:
        - 视频模型/qwen视频模型
      parameters:
        - name: X-DashScope-Async
          in: header
          description: "该字段的取值与含义以本平台实际返回为准。"
          required: true
          example: enable
          schema:
            type: string
        - name: Content-Type
          in: header
          description: "该字段的取值与含义以本平台实际返回为准。"
          required: true
          example: application/json
          schema:
            type: string
        - name: Authorization
          in: header
          description: "该字段的取值与含义以本平台实际返回为准。"
          required: false
          example: Bearer {{YOUR_API_KEY}}
          schema:
            type: string
            default: Bearer {{YOUR_API_KEY}}
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                input:
                  type: object
                  properties:
                    image_url:
                      type: string
                      description: "输入图像的公网可访问 HTTP/HTTPS 链接,不能包含中文等非 ASCII 字符(如有需先编码)。本地文件可先上传获取临时 URL。限制:格式 JPG、JPEG、PNG、BMP、WEBP;宽高均在 200–4096 像素、宽高比 1:3 至 3:1;不超过 5MB。"
                    video_url:
                      type: string
                      description: "输入视频的公网可访问 HTTP/HTTPS 链接,不能包含中文等非 ASCII 字符(如有需先编码)。建议提高参考视频的分辨率与帧率以提升画质。限制:格式 MP4、AVI、MOV;宽高均在 200–2048 像素、宽高比 1:3 至 3:1;不超过 200MB;时长不小于 2s 且不大于 30s。"
                  required:
                    - image_url
                    - video_url
                parameters:
                  type: object
                  properties:
                    mode:
                      type: string
                      description: "模型服务模式:wan-std 标准模式,生成速度较快、性价比高;wan-pro 专业模式,流畅度与效果更好,耗时与费用相应增加。两种模式的实际耗时以本平台实测为准(待补)。"
                    check_image:
                      type: boolean
                      description: "是否进行图像检测:true(默认)会对传入图片进行检测;false 跳过图片检测环节,直接进行后续处理。"
                  required:
                    - mode
              required:
                - model
                - input
                - parameters
            example:
              model: wan2.2-animate-mix
              input:
                image_url: >-
                  https://files.example.com/file-manage-files/zh-CN/20250919/bhkfor/mix_input_image.jpeg
                video_url: >-
                  https://files.example.com/file-manage-files/zh-CN/20250919/wqefue/mix_input_video.mp4
              parameters:
                mode: wan-std
      responses:
        '200':
          description: "该字段的取值与含义以本平台实际返回为准。"
          content:
            application/json:
              schema:
                type: object
                properties: {}
          headers: {}
      security: []
components:
  schemas: {}
  securitySchemes: {}
servers: []
security: []

使用提示:本页接口的 Base URL 为 https://api.allyang.cn,请求头需携带 Authorization: Bearer <令牌>(令牌在控制台「令牌管理」中创建)。示例中的任务 ID、时间戳与文件地址均为示意值,实际以平台返回为准。

模型名请在「模型广场」复制后填入,不要手输;计费、限流与在售清单以平台实测为准(部分数值待补)。