查询一键动画
从源码生成 GET /animations/{animation_id} 的鉴权、字段、响应、错误与安全调用参考。
本页目录
操作
GET /animations/{animation_id}
operationId: get_one_click_animation_v1_animations__animation_id__get
读取所属任务。遵循 Retry-After 并设置轮询截止时间。queued、running、cancelling 非终态;succeeded、failed、cancelled 为终态。后续阶段失败仍可能有可用产物,进度不代表精确时间。
鉴权与副作用
使用可信环境中的 Bearer API Key。所需权限:animations:read
此操作不启动付费生成,其他状态变化见上文说明。
参数
| 参数 | 位置 | 类型 | 必填 | 约束 / 默认值 | 含义 |
|---|---|---|---|---|---|
animation_id |
path |
string |
是 | format: uuid |
所属公共资源 UUID;任务、资产、文件 ID 不能互换。 |
响应
| HTTP | 正文 | 含义 |
|---|---|---|
200 |
TaskResponse | 成功的公开响应,示例数值仅用于说明。 |
400 |
APIErrorEnvelope | 输入错误,修正请求后再尝试。 |
401 |
APIErrorEnvelope | API Key 缺失、到期或被撤销。 |
403 |
APIErrorEnvelope | 账户资格、账户状态或 Key 权限不允许此操作。 |
404 |
APIErrorEnvelope | 资源不可用、不属于当前用户,或签名无效/过期。 |
429 |
APIErrorEnvelope | 触发账户级速率或队列限制,遵循 Retry-After 等待。 |
500 |
APIErrorEnvelope | 内部错误,保留任务 ID 和幂等键,仅标记可重试时重试。 |
503 |
APIErrorEnvelope | 服务或供应商不可用,仅 error.retryable 为 true 时重试。 |
响应头
| HTTP | 响应头 | 类型 | 含义 |
|---|---|---|---|
200 |
Retry-After |
integer |
建议等待秒数,遵循服务值并设置总体截止时间。 |
429 |
Retry-After |
integer |
建议等待秒数,遵循服务值并设置总体截止时间。 |
503 |
Retry-After |
integer |
建议等待秒数,遵循服务值并设置总体截止时间。 |
响应示例
{
"created_at": "2026-08-30T00:00:00Z",
"credits": {
"charged": 0,
"held": 1,
"quoted": 1
},
"error": {
"code": "EXPORT_FAILED",
"message": "Illustrative partial result",
"retryable": true
},
"finished_at": null,
"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",
"mime_type": "video/mp4",
"object": "asset"
}
],
"progress": 1,
"stage": "animation_export",
"started_at": null,
"status": "failed"
}
相关教程
这篇文档有帮助吗?
不收集搜索词、代码或自由文本。此开关只控制文档交互事件;站点通用分析仍遵循隐私政策。 隐私政策