创建一个来自上传视频的角色

POST /v1/videos/characters

MethodPOST
Path/v1/videos/characters
Typehttp
Status1
Module2102810
Folder68864887

概览

MethodPOST
Path/v1/videos/characters
Typehttp
Status1
Module2102810
Folder68864887

请求体

{
  "type": "multipart/form-data",
  "parameters": [
    {
      "name": "name",
      "required": true,
      "description": "定义角色名称。\n\n最大长度80  \n最小长度1",
      "id": "JneOMkZTMb",
      "type": "string",
      "enable": true,
      "sampleValue": "可爱的小鱼"
    },
    {
      "name": "video",
      "required": true,
      "description": "用于创建角色的视频文件。目前角色上传时,2 到 4 秒的短片段效果最佳 16:9 或 9:16,分辨率为 720p 到 1080p。角色源视频在匹配要求输出的画面比例时效果最佳。如果宽高比不同,角色可能会显得拉伸或变形。一个视频最多可包含两个角色。\n\n",
      "id": "MspMEqG0Yi",
      "type": "file",
      "enable": true,
      "schema": {
        "format": "binary",
        "type": "string"
      },
      "sampleValue": "file://C:\\Users\\Administrator\\Desktop\\下载.mp4"
    }
  ],
  "required": false,
  "mediaType": "",
  "examples": [],
  "oasExtensions": ""
}

响应

[
  {
    "id": 790805674,
    "name": "成功",
    "code": 200,
    "contentType": "json",
    "jsonSchema": {
      "type": "object",
      "properties": {}
    },
    "itemSchema": {},
    "description": "",
    "mediaType": "",
    "headers": []
  }
]

响应示例

[
  {
    "name": "成功示例",
    "responseId": 790805674,
    "data": "{\r\n    \"id\": \"video_5c6a605a-30c0-4a6a-9dbd-d1d6cfdd9980\",\r\n    \"object\": \"video\",\r\n    \"model\": \"sora-2\",\r\n    \"status\": \"queued\",\r\n    \"progress\": 0,\r\n    \"created_at\": 1761622232,\r\n    \"seconds\": \"10\",\r\n    \"size\": \"1280x720\"\r\n}",
    "description": "",
    "oasKey": "",
    "oasExtensions": "",
    "id": 721570018
  }
]