跳到主要内容

VideoOut

objectObject
常量值: video
默认值: video
idId必填

生成的 ID。

typeType必填

generate、edit、remake、motion_transfer、reframe 或 soundtrack——生成它的操作。

可能的取值: [generate, edit, remake, motion_transfer, reframe, soundtrack]

statusStatus必填

先是 queued,然后是 running;最后以 completed、failed 或 canceled 结束,之后不再变化。

可能的取值: [queued, running, completed, failed, canceled]

error object

status 为 failed 时的失败原因。

anyOf
codeCode必填

生成失败的原因:content_blocked(内容安全检查拒绝了这个请求或某个输入)、insufficient_credits(计费账户积分耗尽)、invalid_input(某个输入无法使用)、generation_failed(没有产出结果)或 timeout(未能及时完成)。

可能的取值: [content_blocked, insufficient_credits, insufficient_available_credits, invalid_input, generation_failed, timeout]

messageMessage必填

给人看的说明。

files object[]

变为 completed 后的结果——从此就是调用方自己的文件。

  • Array [
  • objectObject
    常量值: file
    默认值: file
    idId必填
    filenameFilename必填
    sizeSize必填
    content_typeContent Type必填
    created_atstring<date-time>必填
    download_urlDownload Url可为 null

    下载文件内容的链接,每次读取时重新签发,有效 60 分钟(到 download_url_expires_at 为止)。要新链接就再读取一次文件。暂时无法生成链接时为 null。

    download_url_expires_atstring<date-time>可为 null

    download_url 失效的时间。

    expires_atstring<date-time>可为 null

    文件的过期时间:此后它无法再读取或使用,内容也会被删除。永不过期时为 null——在消息里发送过的文件随该对话保留,被生成使用过的文件会保留,生成的结果也会保留。上传的文件在上传 30 天后过期,除非在此之前被发送在消息里或被生成使用。

  • ]
  • created_atstring<date-time>必填
    completed_atstring<date-time>可为 null
    VideoOut
    {
    "object": "video",
    "id": "string",
    "type": "generate",
    "status": "queued",
    "error": {
    "code": "content_blocked",
    "message": "string"
    },
    "files": [
    {
    "object": "file",
    "id": "string",
    "filename": "string",
    "size": 0,
    "content_type": "string",
    "created_at": "2024-07-29T15:51:28.071Z",
    "download_url": "string",
    "download_url_expires_at": "2024-07-29T15:51:28.071Z",
    "expires_at": "2024-07-29T15:51:28.071Z"
    }
    ],
    "created_at": "2024-07-29T15:51:28.071Z",
    "completed_at": "2024-07-29T15:51:28.071Z"
    }