1. Pixverse
梧柏API使用文档
WHBAI · Pixverse
  • WHBAI · Google Gemini 原生 (v1alpha)
  • WHBAI · Google Gemini 原生
  • WHBAI · Ideogram
  • WHBAI · Ideogram V3
  • WHBAI · Midjourney
  • WHBAI · Jimeng
  • WHBAI · Kling
  • WHBAI · Luma
  • WHBAI · Luma V1
  • WHBAI · Omni 视频
  • WHBAI · Pixverse
  • WHBAI · Runway
  • WHBAI · Sora2
  • WHBAI · 统一视频 VEO
  • WHBAI · Vidu
  • WHBAI · 豆包 Volc
  • WHBAI · Suno
  • WHBAI · Playground
  • WHBAI · 账号与令牌
  • WHBAI · 阿里 Pix
  • WHBAI · 阿里百炼
  • WHBAI · 私域人像
  • WHBAI · Fal.ai
  • WHBAI · Replicate
  • WHBAI · 腾讯云 VOD
  • WHBAI · MiniMax
  • WHBAI · 支持模型列表
  • WHBAI · Grok Imagine
  • WHBAI · Seedance 2.0
  • WHBAI · TypeSafe
  • WHBAI · OpenAI 兼容
  • Pixverse
    • 模板生图
      POST
    • 文生视频
      POST
    • 图生视频
      POST
    • 转场视频
      POST
    • 视频延长
      POST
    • 融合视频
      POST
    • 对口型
      POST
    • 换脸/换人
      POST
    • 动作模仿
      POST
    • 视频修改
      POST
    • 风格重绘
      POST
    • 音效生成
      POST
    • 多段转场
      POST
    • 上传图片
      POST
    • 上传媒体
      POST
    • Mask 选择
      POST
    • 查询视频任务
      GET
    • 查询图片任务
      GET
    • TTS 音色列表
      GET
  • 数据模型
    • PixverseSampleRequest
    • PostOpenapiV2VideoTextGenerateRequest
    • PostOpenapiV2VideoImgGenerateRequest
    • PostOpenapiV2VideoTransitionGenerateRequest
    • PostOpenapiV2VideoExtendGenerateRequest
    • PostOpenapiV2VideoFusionGenerateRequest
    • PostOpenapiV2VideoLipSyncGenerateRequest
    • PostOpenapiV2VideoSwapGenerateRequest
    • PostOpenapiV2VideoMimicGenerateRequest
    • PostOpenapiV2VideoModifyGenerateRequest
    • PostOpenapiV2VideoRestyleGenerateRequest
    • PostOpenapiV2VideoSoundEffectGenerateRequest
    • PostOpenapiV2VideoMultiTransitionGenerateRequest
    • NewApiError
  1. Pixverse

图生视频

POST
/openapi/v2/video/img/generate
Pixverse 视频生成;提交后通过 GET /openapi/v2/video/result/{id} 轮询。

网站中的模型与调用示例#

生成图生视频#

通过图片进行图生视频的生成. 生成前必须传图片, 用img_id来进行请求.

请求参数#

{
  "contentType": "application/json",
  "properties": {
    "camera_movement": {
      "description": "可以在文/图生视频添加运镜(支持v4,v4.5版本)\n支持参数: \"horizontal_left\",\"horizontal_right\",\"vertical_up\",\"vertical_down\",\n\"zoom_in\",\"zoom_out\",\"crane_up\",\n\"quickly_zoom_in\",\"quickly_zoom_out\",\"smooth_zoom_in\",\n\"camera_rotation\",\"robo_arm\",\"super_dolly_out\",\"whip_pan\",\"hitchcock\",\n\"left_follow\",\"right_follow\",\"pan_left\",\"pan_right\",\"fix_bg\"",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "You can add camera movements to text/picture videos (supports v4 and v4.5 versions)\nSupported parameters: \"horizontal_left\", \"horizontal_right\", \"vertical_up\", \"vertical_down\",\n\"zoom_in\",\"zoom_out\",\"crane_up\",\n\"quickly_zoom_in\",\"quickly_zoom_out\",\"smooth_zoom_in\",\n\"camera_rotation\",\"robo_arm\",\"super_dolly_out\",\"whip_pan\",\"hitchcock\",\n\"left_follow\",\"right_follow\",\"pan_left\",\"pan_right\",\"fix_bg\""
        }
      }
    },
    "duration": {
      "description": "视频生成时长\nv.3.5/v4/v4.5 : 5/8 (v3.5 1080p 无法使用 8)\nv5 : 5/8\nv5.5/5.6 : 5/8/10 (1080p 无法使用 10)\nv6/c1:1~15 任意时长",
      "type": "integer"
    },
    "generate_audio_switch": {
      "description": "支持 v5.5,v5.6,v6,c1\n/ 控制开关Audio. true: Audio on , false: Audio off",
      "type": "boolean",
      "x-i18n": {
        "en-US": {
          "description": "Support v5.5, v5.6, v6, c1\n/ Control switch Audio. true: Audio on, false: Audio off"
        }
      }
    },
    "generate_multi_clip_switch": {
      "description": "支持 v5.5,v6 / 控制单镜头, 多镜头 true: 多镜头 , false: 单镜头",
      "type": "boolean"
    },
    "img_id": {
      "description": "上传图片后获取的img_id",
      "type": "integer",
      "x-i18n": {
        "en-US": {
          "description": "img_id obtained after uploading the image"
        }
      }
    },
    "img_ids": {
      "description": "多图模版时使用此字段. ex) \"img_ids \":[0,0]",
      "items": {
        "type": "integer"
      },
      "type": "array"
    },
    "lip_sync_tts_content": {
      "description": "~140Chracters (UTF-8). 可输入想要的tts 内容",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "~140Chracters (UTF-8). You can enter the desired tts content"
        }
      }
    },
    "lip_sync_tts_speaker_id": {
      "description": "获取TTS 音色后的id",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Get the id of the TTS tone"
        }
      }
    },
    "lip_sync_tts_switch": {
      "description": "true, false\n如果想一起使用对口型 请传为true",
      "type": "boolean",
      "x-i18n": {
        "en-US": {
          "description": "true, false\nIf you want to use lip sync together, please pass it as true"
        }
      }
    },
    "model": {
      "description": "模型 \"v3.5\",\"v4\",\"v4.5\",\"v5\",\"v5.5\",\"v5.6\",\"v6\",\"c1\"",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Model \"v3.5\",\"v4\",\"v4.5\",\"v5\",\"v5.5\",\"v5.6\",\"v6\",\"c1\""
        }
      }
    },
    "motion_mode": {
      "description": "\"normal\",\"fast\". \"fast\" 不支持 8s, \"v5\" 以上版本不支持此字段",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "\"normal\",\"fast\". \"fast\" does not support 8s, \"v5\" or above does not support this field"
        }
      }
    },
    "prompt": {
      "description": "2048 Characters 以内",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Within 2048 Characters"
        }
      }
    },
    "quality": {
      "description": "\"360p\",\"540p\",\"720p\",\"1080p\"",
      "type": "string"
    },
    "seed": {
      "description": "可传随机数 0 - 2147483647\n",
      "type": "integer",
      "x-i18n": {
        "en-US": {
          "description": "Transmittable random number 0 - 2147483647"
        }
      }
    },
    "sound_effect_content": {
      "description": "v5 以下 or 有template_id时可使用.可输入想要的音效, 如果不填写会根据视频内容生成音效",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "It can be used when v5 is below or has template_id. You can enter the desired sound effect. If not filled in, the sound effect will be generated based on the video content."
        }
      }
    },
    "sound_effect_switch": {
      "description": "v5 以下 or 有template_id时可使用.true, false\n如果想一起使用sound_effect 请传为true",
      "type": "boolean",
      "x-i18n": {
        "en-US": {
          "description": "v5 or below or can be used when there is template_id.true, false\nIf you want to use sound_effect together, please pass it as true"
        }
      }
    },
    "style": {
      "description": "风格,可选:\"anime\"、\"3d_animation\"、\"day\"、\"cyberpunk\"、\"comic\",如非必要可不传",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Style, optional: \"anime\", \"3d_animation\", \"day\", \"cyberpunk\", \"comic\", don't pass it if it's not necessary"
        }
      }
    },
    "template_id": {
      "description": "模版ID\n",
      "type": "integer",
      "x-i18n": {
        "en-US": {
          "description": "Template ID"
        }
      }
    },
    "thinking_type": {
      "description": "支持v5.5,v5.6,v6/ 是否使用系统优化提示词功能 \"enabled\" : 打开 \"disabled\" : 关闭. \"auto\" or omitted: 让模型自动决定",
      "type": "string"
    }
  },
  "required": [
    "duration",
    "model",
    "prompt",
    "quality",
    "img_id",
    "img_ids"
  ]
}

请求示例 · 生成图生视频#

"{\r\n    \"duration\": 5,\r\n    \"img_id\": 1,\r\n    \"model\": \"v6\",\r\n    \"template_id\": 0,\r\n    \"motion_mode\": \"normal\",\r\n    //\"camera_movement\": \"zoom_in\", // 可以在文/图生视频添加运镜(支持v4,v4.5版本)参数请参考文档\r\n    \"prompt\": \"string\",\r\n    \"quality\": \"720p\",\r\n    //\"template_id\": 302325299692608, //激活模版才可使用此字段\r\n    //\"sound_effect_switch\":true,\r\n    //\"sound_effect_content\":\"\",\r\n    //\"lip_sync_tts_switch\":true,\r\n    //\"lip_sync_tts_content\":\"\",\r\n    //\"lip_sync_tts_speaker_id\":\"\",\r\n    \"seed\": 0\r\n}"

请求示例 · 生成视频模版#

"{\r\n    \"duration\": 5,\r\n    \"img_id\": 1,\r\n    \"model\": \"v6\",\r\n    \"template_id\": 0,\r\n    \"prompt\": \"string\",\r\n    \"quality\": \"720p\",\r\n    //\"sound_effect_switch\":true\r\n}"

生成图生视频#

通过图片进行图生视频的生成. 生成前必须传图片, 用img_id来进行请求.

请求参数#

{
  "contentType": "application/json",
  "properties": {
    "camera_movement": {
      "description": "可以在文/图生视频添加运镜(支持v4,v4.5版本)\n支持参数: \"horizontal_left\",\"horizontal_right\",\"vertical_up\",\"vertical_down\",\n\"zoom_in\",\"zoom_out\",\"crane_up\",\n\"quickly_zoom_in\",\"quickly_zoom_out\",\"smooth_zoom_in\",\n\"camera_rotation\",\"robo_arm\",\"super_dolly_out\",\"whip_pan\",\"hitchcock\",\n\"left_follow\",\"right_follow\",\"pan_left\",\"pan_right\",\"fix_bg\"",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "You can add camera movements to text/picture videos (supports v4 and v4.5 versions)\nSupported parameters: \"horizontal_left\", \"horizontal_right\", \"vertical_up\", \"vertical_down\",\n\"zoom_in\",\"zoom_out\",\"crane_up\",\n\"quickly_zoom_in\",\"quickly_zoom_out\",\"smooth_zoom_in\",\n\"camera_rotation\",\"robo_arm\",\"super_dolly_out\",\"whip_pan\",\"hitchcock\",\n\"left_follow\",\"right_follow\",\"pan_left\",\"pan_right\",\"fix_bg\""
        }
      }
    },
    "duration": {
      "description": "视频生成时长\nv.3.5/v4/v4.5 : 5/8 (v3.5 1080p 无法使用 8)\nv5 : 5/8\nv5.5/5.6 : 5/8/10 (1080p 无法使用 10)\nv6/c1:1~15 任意时长",
      "type": "integer"
    },
    "generate_audio_switch": {
      "description": "支持 v5.5,v5.6,v6,c1\n/ 控制开关Audio. true: Audio on , false: Audio off",
      "type": "boolean",
      "x-i18n": {
        "en-US": {
          "description": "Support v5.5, v5.6, v6, c1\n/ Control switch Audio. true: Audio on, false: Audio off"
        }
      }
    },
    "generate_multi_clip_switch": {
      "description": "支持 v5.5,v6 / 控制单镜头, 多镜头 true: 多镜头 , false: 单镜头",
      "type": "boolean"
    },
    "img_id": {
      "description": "上传图片后获取的img_id",
      "type": "integer",
      "x-i18n": {
        "en-US": {
          "description": "img_id obtained after uploading the image"
        }
      }
    },
    "img_ids": {
      "description": "多图模版时使用此字段. ex) \"img_ids \":[0,0]",
      "items": {
        "type": "integer"
      },
      "type": "array"
    },
    "lip_sync_tts_content": {
      "description": "~140Chracters (UTF-8). 可输入想要的tts 内容",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "~140Chracters (UTF-8). You can enter the desired tts content"
        }
      }
    },
    "lip_sync_tts_speaker_id": {
      "description": "获取TTS 音色后的id",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Get the id of the TTS tone"
        }
      }
    },
    "lip_sync_tts_switch": {
      "description": "true, false\n如果想一起使用对口型 请传为true",
      "type": "boolean",
      "x-i18n": {
        "en-US": {
          "description": "true, false\nIf you want to use lip sync together, please pass it as true"
        }
      }
    },
    "model": {
      "description": "模型 \"v3.5\",\"v4\",\"v4.5\",\"v5\",\"v5.5\",\"v5.6\",\"v6\",\"c1\"",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Model \"v3.5\",\"v4\",\"v4.5\",\"v5\",\"v5.5\",\"v5.6\",\"v6\",\"c1\""
        }
      }
    },
    "motion_mode": {
      "description": "\"normal\",\"fast\". \"fast\" 不支持 8s, \"v5\" 以上版本不支持此字段",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "\"normal\",\"fast\". \"fast\" does not support 8s, \"v5\" or above does not support this field"
        }
      }
    },
    "prompt": {
      "description": "2048 Characters 以内",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Within 2048 Characters"
        }
      }
    },
    "quality": {
      "description": "\"360p\",\"540p\",\"720p\",\"1080p\"",
      "type": "string"
    },
    "seed": {
      "description": "可传随机数 0 - 2147483647\n",
      "type": "integer",
      "x-i18n": {
        "en-US": {
          "description": "Transmittable random number 0 - 2147483647"
        }
      }
    },
    "sound_effect_content": {
      "description": "v5 以下 or 有template_id时可使用.可输入想要的音效, 如果不填写会根据视频内容生成音效",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "It can be used when v5 is below or has template_id. You can enter the desired sound effect. If not filled in, the sound effect will be generated based on the video content."
        }
      }
    },
    "sound_effect_switch": {
      "description": "v5 以下 or 有template_id时可使用.true, false\n如果想一起使用sound_effect 请传为true",
      "type": "boolean",
      "x-i18n": {
        "en-US": {
          "description": "v5 or below or can be used when there is template_id.true, false\nIf you want to use sound_effect together, please pass it as true"
        }
      }
    },
    "style": {
      "description": "风格,可选:\"anime\"、\"3d_animation\"、\"day\"、\"cyberpunk\"、\"comic\",如非必要可不传",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Style, optional: \"anime\", \"3d_animation\", \"day\", \"cyberpunk\", \"comic\", don't pass it if it's not necessary"
        }
      }
    },
    "template_id": {
      "description": "模版ID\n",
      "type": "integer",
      "x-i18n": {
        "en-US": {
          "description": "Template ID"
        }
      }
    },
    "thinking_type": {
      "description": "支持v5.5,v5.6,v6/ 是否使用系统优化提示词功能 \"enabled\" : 打开 \"disabled\" : 关闭. \"auto\" or omitted: 让模型自动决定",
      "type": "string"
    }
  },
  "required": [
    "duration",
    "model",
    "prompt",
    "quality",
    "img_id",
    "img_ids"
  ]
}

请求示例 · 生成图生视频#

"{\r\n    \"duration\": 5,\r\n    \"img_id\": 1,\r\n    \"model\": \"v6\",\r\n    \"template_id\": 0,\r\n    \"motion_mode\": \"normal\",\r\n    //\"camera_movement\": \"zoom_in\", // 可以在文/图生视频添加运镜(支持v4,v4.5版本)参数请参考文档\r\n    \"prompt\": \"string\",\r\n    \"quality\": \"720p\",\r\n    //\"template_id\": 302325299692608, //激活模版才可使用此字段\r\n    //\"sound_effect_switch\":true,\r\n    //\"sound_effect_content\":\"\",\r\n    //\"lip_sync_tts_switch\":true,\r\n    //\"lip_sync_tts_content\":\"\",\r\n    //\"lip_sync_tts_speaker_id\":\"\",\r\n    \"seed\": 0\r\n}"

请求示例 · 生成视频模版#

"{\r\n    \"duration\": 5,\r\n    \"img_id\": 1,\r\n    \"model\": \"v6\",\r\n    \"template_id\": 0,\r\n    \"prompt\": \"string\",\r\n    \"quality\": \"720p\",\r\n    //\"sound_effect_switch\":true\r\n}"

生成图生视频#

通过图片进行图生视频的生成. 生成前必须传图片, 用img_id来进行请求.

请求参数#

{
  "contentType": "application/json",
  "properties": {
    "camera_movement": {
      "description": "可以在文/图生视频添加运镜(支持v4,v4.5版本)\n支持参数: \"horizontal_left\",\"horizontal_right\",\"vertical_up\",\"vertical_down\",\n\"zoom_in\",\"zoom_out\",\"crane_up\",\n\"quickly_zoom_in\",\"quickly_zoom_out\",\"smooth_zoom_in\",\n\"camera_rotation\",\"robo_arm\",\"super_dolly_out\",\"whip_pan\",\"hitchcock\",\n\"left_follow\",\"right_follow\",\"pan_left\",\"pan_right\",\"fix_bg\"",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "You can add camera movements to text/picture videos (supports v4 and v4.5 versions)\nSupported parameters: \"horizontal_left\", \"horizontal_right\", \"vertical_up\", \"vertical_down\",\n\"zoom_in\",\"zoom_out\",\"crane_up\",\n\"quickly_zoom_in\",\"quickly_zoom_out\",\"smooth_zoom_in\",\n\"camera_rotation\",\"robo_arm\",\"super_dolly_out\",\"whip_pan\",\"hitchcock\",\n\"left_follow\",\"right_follow\",\"pan_left\",\"pan_right\",\"fix_bg\""
        }
      }
    },
    "duration": {
      "description": "视频生成时长\nv.3.5/v4/v4.5 : 5/8 (v3.5 1080p 无法使用 8)\nv5 : 5/8\nv5.5/5.6 : 5/8/10 (1080p 无法使用 10)\nv6/c1:1~15 任意时长",
      "type": "integer"
    },
    "generate_audio_switch": {
      "description": "支持 v5.5,v5.6,v6,c1\n/ 控制开关Audio. true: Audio on , false: Audio off",
      "type": "boolean",
      "x-i18n": {
        "en-US": {
          "description": "Support v5.5, v5.6, v6, c1\n/ Control switch Audio. true: Audio on, false: Audio off"
        }
      }
    },
    "generate_multi_clip_switch": {
      "description": "支持 v5.5,v6 / 控制单镜头, 多镜头 true: 多镜头 , false: 单镜头",
      "type": "boolean"
    },
    "img_id": {
      "description": "上传图片后获取的img_id",
      "type": "integer",
      "x-i18n": {
        "en-US": {
          "description": "img_id obtained after uploading the image"
        }
      }
    },
    "img_ids": {
      "description": "多图模版时使用此字段. ex) \"img_ids \":[0,0]",
      "items": {
        "type": "integer"
      },
      "type": "array"
    },
    "lip_sync_tts_content": {
      "description": "~140Chracters (UTF-8). 可输入想要的tts 内容",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "~140Chracters (UTF-8). You can enter the desired tts content"
        }
      }
    },
    "lip_sync_tts_speaker_id": {
      "description": "获取TTS 音色后的id",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Get the id of the TTS tone"
        }
      }
    },
    "lip_sync_tts_switch": {
      "description": "true, false\n如果想一起使用对口型 请传为true",
      "type": "boolean",
      "x-i18n": {
        "en-US": {
          "description": "true, false\nIf you want to use lip sync together, please pass it as true"
        }
      }
    },
    "model": {
      "description": "模型 \"v3.5\",\"v4\",\"v4.5\",\"v5\",\"v5.5\",\"v5.6\",\"v6\",\"c1\"",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Model \"v3.5\",\"v4\",\"v4.5\",\"v5\",\"v5.5\",\"v5.6\",\"v6\",\"c1\""
        }
      }
    },
    "motion_mode": {
      "description": "\"normal\",\"fast\". \"fast\" 不支持 8s, \"v5\" 以上版本不支持此字段",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "\"normal\",\"fast\". \"fast\" does not support 8s, \"v5\" or above does not support this field"
        }
      }
    },
    "prompt": {
      "description": "2048 Characters 以内",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Within 2048 Characters"
        }
      }
    },
    "quality": {
      "description": "\"360p\",\"540p\",\"720p\",\"1080p\"",
      "type": "string"
    },
    "seed": {
      "description": "可传随机数 0 - 2147483647\n",
      "type": "integer",
      "x-i18n": {
        "en-US": {
          "description": "Transmittable random number 0 - 2147483647"
        }
      }
    },
    "sound_effect_content": {
      "description": "v5 以下 or 有template_id时可使用.可输入想要的音效, 如果不填写会根据视频内容生成音效",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "It can be used when v5 is below or has template_id. You can enter the desired sound effect. If not filled in, the sound effect will be generated based on the video content."
        }
      }
    },
    "sound_effect_switch": {
      "description": "v5 以下 or 有template_id时可使用.true, false\n如果想一起使用sound_effect 请传为true",
      "type": "boolean",
      "x-i18n": {
        "en-US": {
          "description": "v5 or below or can be used when there is template_id.true, false\nIf you want to use sound_effect together, please pass it as true"
        }
      }
    },
    "style": {
      "description": "风格,可选:\"anime\"、\"3d_animation\"、\"day\"、\"cyberpunk\"、\"comic\",如非必要可不传",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Style, optional: \"anime\", \"3d_animation\", \"day\", \"cyberpunk\", \"comic\", don't pass it if it's not necessary"
        }
      }
    },
    "template_id": {
      "description": "模版ID\n",
      "type": "integer",
      "x-i18n": {
        "en-US": {
          "description": "Template ID"
        }
      }
    },
    "thinking_type": {
      "description": "支持v5.5,v5.6,v6/ 是否使用系统优化提示词功能 \"enabled\" : 打开 \"disabled\" : 关闭. \"auto\" or omitted: 让模型自动决定",
      "type": "string"
    }
  },
  "required": [
    "duration",
    "model",
    "prompt",
    "quality",
    "img_id",
    "img_ids"
  ]
}

请求示例 · 生成图生视频#

"{\r\n    \"duration\": 5,\r\n    \"img_id\": 1,\r\n    \"model\": \"v6\",\r\n    \"template_id\": 0,\r\n    \"motion_mode\": \"normal\",\r\n    //\"camera_movement\": \"zoom_in\", // 可以在文/图生视频添加运镜(支持v4,v4.5版本)参数请参考文档\r\n    \"prompt\": \"string\",\r\n    \"quality\": \"720p\",\r\n    //\"template_id\": 302325299692608, //激活模版才可使用此字段\r\n    //\"sound_effect_switch\":true,\r\n    //\"sound_effect_content\":\"\",\r\n    //\"lip_sync_tts_switch\":true,\r\n    //\"lip_sync_tts_content\":\"\",\r\n    //\"lip_sync_tts_speaker_id\":\"\",\r\n    \"seed\": 0\r\n}"

请求示例 · 生成视频模版#

"{\r\n    \"duration\": 5,\r\n    \"img_id\": 1,\r\n    \"model\": \"v6\",\r\n    \"template_id\": 0,\r\n    \"prompt\": \"string\",\r\n    \"quality\": \"720p\",\r\n    //\"sound_effect_switch\":true\r\n}"

请求参数

Authorization
Bearer Token
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
or
Body 参数application/json必填

示例
{
    "model": "v5.5",
    "prompt": "A cat running on grass",
    "duration": 5,
    "quality": "720p",
    "aspect_ratio": "16:9"
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
cURL
curl --location '/openapi/v2/video/img/generate' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "model": "v5.5",
    "prompt": "A cat running on grass",
    "duration": 5,
    "quality": "720p",
    "aspect_ratio": "16:9"
}'

返回响应

🟢200成功
application/json
成功
Bodyapplication/json

示例
{
    "ErrCode": 0,
    "ErrMsg": "success",
    "RespData": {
        "id": 123456
    }
}
🟠400请求有误
🟠401没有权限
修改于 2026-10-24 18:33:15
上一页
文生视频
下一页
转场视频
Built with