查询视频生成任务
curl --request GET \
--url https://api.apipod.ai/api/v3/contents/generations/tasks/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.apipod.ai/api/v3/contents/generations/tasks/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.apipod.ai/api/v3/contents/generations/tasks/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}falseconst options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.apipod.ai/api/v3/contents/generations/tasks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "0f4c9f6e-1111-4c1d-8c2f-2b7b9a1c4d55",
"model": "seedance-2.5",
"status": "succeeded",
"content": {
"video_url": "https://cdn.example.com/generated.mp4"
},
"created_at": 1786358400,
"updated_at": 1786358523,
"usage": {
"completion_tokens": 123,
"total_tokens": 123,
"cost": 0.053
}
}任务
查询视频任务(方舟兼容)
轮询通过火山方舟兼容端点创建的异步视频生成任务状态。
GET
https://api.apipod.ai
/
api
/
v3
/
contents
/
generations
/
tasks
/
{id}
查询视频生成任务
curl --request GET \
--url https://api.apipod.ai/api/v3/contents/generations/tasks/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.apipod.ai/api/v3/contents/generations/tasks/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.apipod.ai/api/v3/contents/generations/tasks/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}falseconst options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.apipod.ai/api/v3/contents/generations/tasks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "0f4c9f6e-1111-4c1d-8c2f-2b7b9a1c4d55",
"model": "seedance-2.5",
"status": "succeeded",
"content": {
"video_url": "https://cdn.example.com/generated.mp4"
},
"created_at": 1786358400,
"updated_at": 1786358523,
"usage": {
"completion_tokens": 123,
"total_tokens": 123,
"cost": 0.053
}
}使用创建接口返回的任务
id 轮询本接口,直到任务到达终态。创建接口在各模型的「兼容官方接口」文档中(如 Seedance 2.5)。生产环境建议在创建请求中设置 callback_url,避免高频轮询。任务记录的保留窗口与 APIPod 原生任务一致;任务成功后请及时下载或转存视频 URL。
任务状态
status | 含义 | 建议动作 |
|---|---|---|
queued | 任务排队中。 | 等待后继续轮询。 |
running | 任务执行中。 | 等待后继续轮询。 |
succeeded | 任务成功,视频 URL 在 content.video_url。 | 下载并保存产物。 |
failed | 任务失败,详情见 error。 | 查看 error.code 与 error.message。 |
cancelled | 任务已取消。 | 停止轮询。 |
用量与费用
status 为 succeeded 时,响应携带 usage 对象,包含本任务的最终扣费金额。cost 为完成后的结算金额(USD),与控制台展示一致;它是 APIPod 对方舟契约的扩展字段,始终返回。token 字段仅在上游回传用量时出现。
任务不存在与任务属于其他账号统一返回 404,两种情况不做区分。授权
在 Authorization 头中以 Bearer 方式携带 APIPod API Key。
路径参数
创建接口返回的任务 ID。
响应
任务状态快照
任务 ID。
本任务使用的公开模型系列名。
方舟语义的任务状态。
可用选项:
queued, running, succeeded, failed, cancelled 输出内容,仅在任务成功后出现。
Show child attributes
Show child attributes
任务创建时间(Unix 秒级时间戳)。
任务最近一次状态更新时间(Unix 秒级时间戳)。
仅在任务失败时出现。
Show child attributes
Show child attributes
终态用量快照,仅在任务成功后出现。
Show child attributes
Show child attributes
此页面对您有帮助吗?