复用视频续导动画
从源码生成 POST /animations/{animation_id}/retry-export 的鉴权、字段、响应、错误与安全调用参考。
本页目录
操作
POST /animations/{animation_id}/retry-export
operationId: retry_one_click_animation_export_v1_animations__animation_id__retry_export_post
续导因存储配额阻挡、但已保留生成视频的所属动画。先清理空间或升级,按 error.details.recovery 提示调用。复用原视频和固定导出 ID,不重新生成或扣费;重复调用返回同一次导出,无需请求体或 Idempotency-Key。202 表示导出中,继续轮询原动画 ID。已取消、已退款、源视频已删除或其他失败不可使用。
鉴权与副作用
使用可信环境中的 Bearer API Key。所需权限:animations:write
此操作不启动付费生成,其他状态变化见上文说明。
参数
| 参数 | 位置 | 类型 | 必填 | 约束 / 默认值 | 含义 |
|---|---|---|---|---|---|
animation_id |
path |
string |
是 | format: uuid |
所属公共资源 UUID;任务、资产、文件 ID 不能互换。 |
响应
| HTTP | 正文 | 含义 |
|---|---|---|
200 |
TaskResponse | 当前动画终态结果,须检查 status 和 error。 |
202 |
TaskResponse | 已恢复导出,轮询原动画 ID;不重新生成或扣费。 |
400 |
APIErrorEnvelope | 输入错误,修正请求后再尝试。 |
401 |
APIErrorEnvelope | API Key 缺失、到期或被撤销。 |
403 |
APIErrorEnvelope | 账户资格、账户状态或 Key 权限不允许此操作。 |
404 |
APIErrorEnvelope | 资源不可用、不属于当前用户,或签名无效/过期。 |
409 |
APIErrorEnvelope | 此动画当前不允许续导。 |
413 |
APIErrorEnvelope | 请求或解码后的图片超过配置限制。 |
429 |
APIErrorEnvelope | 触发账户级速率或队列限制,遵循 Retry-After 等待。 |
500 |
APIErrorEnvelope | 内部错误,保留任务 ID 和幂等键,仅标记可重试时重试。 |
503 |
APIErrorEnvelope | 服务或供应商不可用,仅 error.retryable 为 true 时重试。 |
响应头
| HTTP | 响应头 | 类型 | 含义 |
|---|---|---|---|
200 |
Retry-After |
integer |
建议等待秒数,遵循服务值并设置总体截止时间。 |
202 |
Retry-After |
integer |
建议等待秒数,遵循服务值并设置总体截止时间。 |
429 |
Retry-After |
integer |
建议等待秒数,遵循服务值并设置总体截止时间。 |
503 |
Retry-After |
integer |
建议等待秒数,遵循服务值并设置总体截止时间。 |
响应示例
{
"created_at": "2026-08-30T00:00:00Z",
"credits": {
"charged": 1,
"held": 0,
"quoted": 1
},
"error": null,
"finished_at": "2026-08-30T00:00:00Z",
"id": "00000000-0000-4000-8000-000000000002",
"metadata": {},
"normalized_input": {},
"object": "animation",
"outputs": [
{
"byte_size": 1024,
"created_at": "2026-08-30T00:00:00Z",
"download_expires_at": "2026-08-30T01:00:00Z",
"download_url": "https://downloads.example.invalid/illustrative-asset",
"format": "clip_video",
"id": "00000000-0000-4000-8000-000000000003",
"media": {
"duration_seconds": 5.04,
"fps": 25,
"frame_count": 126,
"height": 512,
"width": 512
},
"mime_type": "video/mp4",
"object": "asset"
},
{
"byte_size": 1024,
"created_at": "2026-08-30T00:00:00Z",
"download_expires_at": "2026-08-30T01:00:00Z",
"download_url": "https://downloads.example.invalid/illustrative-export",
"format": "frames_zip",
"id": "00000000-0000-4000-8000-000000000006",
"mime_type": "application/zip",
"object": "asset"
}
],
"progress": 1,
"stage": "completed",
"started_at": null,
"status": "succeeded"
}
相关教程
这篇文档有帮助吗?
不收集搜索词、代码或自由文本。此开关只控制文档交互事件;站点通用分析仍遵循隐私政策。 隐私政策