# 视频任务对象 视频任务详情。结果不可用时任务保持处理中、结算需核对;成功任务有结果素材,且交付已可用。失败或取消的任务结算可为待处理或已结算;已结算的失败或取消任务最终费用及未收款为零。 ## 属性 | 字段 | 类型 | 要求 | 说明 | | --- | --- | --- | --- | | `id` | string | 必填 | 平台任务标识。 长度:4–128。 字符:A–Z a–z 0–9 _ -。 | | `object` | string | 必填 | 对象类型标识。 固定为:video.task。 | | `request_id` | string | 必填 | 请求关联标识。 长度:4–128。 字符:A–Z a–z 0–9 _ -。 | | `billing_correlation_id` | string | 必填 | 费用关联标识。 长度:4–128。 字符:A–Z a–z 0–9 _ -。 | | `model` | string | 必填 | 本次使用的模型标识。 `dreamina-seedance-2-0-260128`:Seedance 2.0; `dreamina-seedance-2-0-fast-260128`:Seedance 2.0 Fast; `dreamina-seedance-2-0-mini-260615`:Seedance 2.0 Mini; | | `status` | string | 必填 | 当前状态,具体含义见对应取值。 `queued`:排队中; `processing`:处理中; `succeeded`:已成功; `failed`:已失败; `cancelled`:已取消; | | `phase` | string | 必填,可能为空 | 任务执行阶段;没有当前阶段时为空。 `preparing_assets`:准备素材; `waiting_route`:等待处理; `submitting`:准备生成; `provider_processing`:生成中; `reconciling`:确认结果中; `finalizing`:整理结果; `settlement_pending`:等待结算; `null`:空值; | | `delivery_status` | string | 必填 | 结果交付状态。 `pending`:待交付; `materializing`:准备下载; `available`:可下载; `output_unavailable`:结果不可用; | | `settlement_status` | string | 必填 | 当前费用结算状态。 `reserved`:已预留费用; `pending`:待处理; `reconciliation_required`:需要核对; `settled`:已结算; `settled_with_receivable`:已结算,仍有应收金额; | | `created_at` | integer | 必填 | 创建时间,Unix 整数秒。 范围:≥ 0。 | | `started_at` | integer | 必填,可能为空 | 任务开始时间,未开始时为空。 范围:≥ 0。 | | `completed_at` | integer | 必填,可能为空 | 任务完成时间,未完成时为空。 范围:≥ 0。 | | `usage` | object | 必填,可能为空 | 任务用量对象,可为空。 | | `usage.meter_type` | string | 必填 | 用量计量类型。 固定为:seedance_video_generation。 | | `usage.video_tokens` | integer | 必填,可能为空 | 视频计量单位数;实际用量允许为空的情况以字段类型为准。 范围:≥ 0。 | | `usage.output_duration_seconds` | integer | 必填 | 输出视频时长,秒。 范围:≥ 0。 | | `usage.input_video_duration_seconds` | integer | 必填 | 输入参考视频总时长,秒。 范围:≥ 0。 | | `usage.resolution` | string | 必填 | 输出分辨率。fast 和 mini 仅支持 480p 或 720p。 `480p`:四百八十线分辨率; `720p`:七百二十线分辨率; `1080p`:一千零八十线分辨率; | | `usage.fps` | integer | 必填 | 视频帧率。 范围:1–120。 | | `usage.has_reference_video` | boolean | 必填 | 是否使用参考视频。 | | `billing` | object | 必填 | 任务结算摘要,可为空。 | | `billing.currency` | string | 必填 | 金额币种,美元。 固定为:USD。 | | `billing.final_actual_cost` | string | 必填,可能为空 | 最终实际费用;尚未确定时为空。 格式:6 位小数。 | | `billing.collected_liability_amount` | string | 必填 | 已收取的计费金额。 格式:6 位小数。 | | `billing.funding_debit_amount` | string | 必填 | 实际扣减的资金金额。 格式:6 位小数。 | | `billing.refunded_liability_amount` | string | 必填 | 已退回的计费金额。 格式:6 位小数。 | | `billing.funding_refund_amount` | string | 必填 | 实际退回的资金金额。 格式:6 位小数。 | | `billing.outstanding_receivable` | string | 必填 | 尚未收取的应收金额。 格式:6 位小数。 | | `billing.billing_url` | string | 必填 | 本任务的费用明细相对路径。 格式:/v1/video/tasks/{task_id}/billing。 | | `output` | object | 必填,可能为空 | 任务生成结果,可为空。 | | `output.assets` | array | 必填 | 结果素材列表。 数量:1–16。 | | `output.assets.asset_id` | string | 必填 | 平台素材标识。 长度:4–128。 字符:A–Z a–z 0–9 _ -。 | | `output.assets.media_type` | string | 必填 | 媒体类型。 `video`:视频; `image`:图片; `audio`:音频; | | `output.assets.role` | string | 必填 | 素材在输入或结果中的用途。 `result`:生成结果; `last_frame`:尾帧; `audio`:音频; | | `output.assets.url` | string | 必填,可能为空 | 可下载时为 HTTPS 下载地址;过期或不可用时为空。 长度:12–4096。 格式:https://。 | | `output.assets.materialized_at` | integer | 必填,可能为空 | 结果准备完成的时间,Unix 整数秒。 范围:≥ 0。 | | `output.assets.expires_at` | integer | 必填,可能为空 | 结果到期时间,为结果准备完成后再过当时生效的保留期(默认 7 天),与任务完成时间分别计算。 范围:≥ 0。 | | `output.assets.delivery_source` | string | 必填 | 结果交付来源。 `platform`:平台交付; | | `output.assets.materialization_status` | string | 必填 | 结果准备状态。 `completed`:已完成; `retrying`:重试中; `failed`:失败; | | `output.assets.download_status` | string | 必填 | 下载状态:可用、过期或不可用。 `available`:可用; `expired`:已过期; `unavailable`:不可用; | | `cancellation` | object | 必填,可能为空 | 取消状态投影,可为空。 | | `cancellation.cancel_operation_id` | string | 必填 | 取消操作的稳定标识。 长度:4–128。 字符:A–Z a–z 0–9 _ -。 | | `cancellation.status` | string | 必填 | 当前状态,具体含义见对应取值。 `requested`:已请求取消; `effective`:取消已生效; `not_effective`:取消未生效; `failed`:失败; | | `cancellation.reason_code` | string | 必填,可能为空 | 取消未生效或失败时的原因码;已请求或已生效时为空。 长度:1–96。 字符:a–z 0–9 _。 | | `error` | object | 必填,可能为空 | 错误对象。 | | `error.code` | string | 必填 | 机器可读错误码。 `no_common_asset_route`:素材暂不可用; `asset_not_ready`:引用素材仍在处理中; `asset_review_timeout`:素材审核超时; `route_misconfigured`:服务配置错误; `route_temporarily_unavailable`:暂不可用; `generation_expired`:生成已超时; `generation_failed`:生成失败; `input_fetch_failed`:输入素材下载失败; `input_url_not_allowed`:输入素材链接不允许下载; `input_too_large`:输入素材超过大小上限; `input_unsupported`:输入素材格式、尺寸或时长不受支持; `input_rejected`:输入素材未通过内容审核; `input_preparation_failed`:未能及时准备输入素材; `input_duration_exceeded`:输入素材总时长超过型号上限; | | `error.message` | string | 必填 | 供人阅读的错误说明。 长度:1–1024。 | | `error.details` | object | 可选 | 可选的结构化错误详情。 | | `error.details.content_index` | integer | 可选 | 失败输入在原始 content 数组中的下标,从 0 起,文字项也计入。 范围:0–50。 | ## 示例 ```json { "id": "task_32ae2a5177b310d3bc1ec83a98f63889", "object": "video.task", "request_id": "req_6acd96894df9798feb0ddb21e5a52d70", "billing_correlation_id": "billcorr_2f6c57065a4404b27fb9b6b24ea9a0d0", "model": "dreamina-seedance-2-0-260128", "status": "succeeded", "phase": null, "delivery_status": "available", "settlement_status": "settled", "created_at": 1793167380, "started_at": 1793167381, "completed_at": 1793167382, "usage": { "meter_type": "seedance_video_generation", "video_tokens": 51652, "output_duration_seconds": 5, "input_video_duration_seconds": 0, "resolution": "720p", "fps": 24, "has_reference_video": false }, "billing": { "currency": "USD", "final_actual_cost": "0.361564", "collected_liability_amount": "0.361564", "funding_debit_amount": "0.361564", "refunded_liability_amount": "0.000000", "funding_refund_amount": "0.000000", "outstanding_receivable": "0.000000", "billing_url": "/v1/video/tasks/task_32ae2a5177b310d3bc1ec83a98f63889/billing" }, "output": { "assets": [ { "asset_id": "asset_4d00c4c64086b1e29724c1f2349f3708", "media_type": "video", "role": "result", "url": "https://media.example.invalid/download/result-0001?signature=example", "materialized_at": 1793167385, "expires_at": 1793253785, "delivery_source": "platform", "materialization_status": "completed", "download_status": "available" } ] }, "cancellation": null, "error": null } ``` 用「[查询视频任务](./api-docs-zh-api-video-tasks-retrieve.md)」读取这个对象。