国产视频模型生成

使用 `POST /v1/videos` 提交国产视频任务。

POSThttps://duoyuanx.com/v1/videos
请求示例
curl -X POST https://duoyuanx.com/v1/videos \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '
{
  "model": "Kling-3.0-Omni",
  "prompt": "镜头环绕建筑并使用希区柯克变焦",
  "seconds": "15",
  "size": "720x1280",
  "metadata": {
    "scene_type": "motion_control",
    "motion_level": "pro",
    "file_infos": [
      {
        "type": "Url",
        "category": "Video",
        "url": "https://example.com/motion-ref.mp4"
      }
    ],
    "output_config": {
      "duration": 15,
      "resolution": "720P",
      "aspect_ratio": "9:16",
      "audio_generation": "Enabled"
    }
  }
}'

通过 POST /v1/videos 提交国产视频任务,支持文生视频、图生视频、首尾帧、动作控制、数字人、对口型、模板特效等场景,扩展参数通过 metadata 传递。

请求头

Authorizationstring必填

请求身份认证。使用 Bearer Token,示例值:Bearer YOUR_API_KEY。

Content-Typestring必填

请求内容类型,必须设置为 application/json。

请求体

modelstring必填

模型名称。可以直接传基础模型,也可以传组合计费模型。

promptstring必填

提示词。

secondsstring | integer

时长。顶层 seconds 优先级最高。

durationinteger

时长兼容字段。

sizestring

快速尺寸字段,例如 720x1280 或 1280x720。

imagestring

单张参考图或首帧图。

imagesarray<string>

多张参考图。

input_referencestring | array<string>

参考图输入,兼容 URL、base64、data URI 与文件上传。

metadataobject

扩展参数。常用 metadata.output_config、scene_type、motion_level、offpeak、video_url、file_infos、ext_info。

请求示例

场景

场景关键字段
文生视频prompt + seconds
图生视频image / images / input_reference
首尾帧image + metadata.last_frame_url
动作控制metadata.scene_type=motion_control + 视频参考
数字人metadata.scene_type=avatar_i2v
对口型metadata.scene_type=lip_sync
模板特效metadata.scene_type=template_effect

规则

  • seconds / duration 可以放顶层,也可以放 metadata
  • 顶层时长优先级最高
  • scene_type=motion_control 必须提供视频参考
  • scene_type=lip_sync 不足 5 秒按 5 秒计
  • FileInfos 最多 3 项

metadata.output_config

常用字段:

  • resolution
  • aspect_ratio
  • audio_generation
  • duration
  • person_generation
  • input_compliance_check
  • output_compliance_check
  • enhance_switch
  • frame_interpolate
  • logo_add

相关页面