curl --request GET \
--url 'https://api.elkapi.com/v1/video/generations/task_abc123' \
--header 'Authorization: Bearer <token>'
import requests
url = "https://api.elkapi.com/v1/video/generations/task_abc123"
headers = {
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://api.elkapi.com/v1/video/generations/task_abc123", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
}
});
console.log(await response.json());
{
"code": "success",
"message": "",
"data": {
"task_id": "task_abc123",
"platform": "doubao-video",
"action": "generate",
"status": "SUCCESS",
"progress": "100%",
"result_url": "https://example.com/video.mp4",
"created_at": 1760000000,
"updated_at": 1760000060,
"data": {
"id": "upstream_task_id",
"status": "succeeded",
"content": {
"video_url": "https://example.com/video.mp4"
},
"usage": {
"completion_tokens": 123456,
"total_tokens": 123456
}
}
}
}
{
"error": {
"message": "task_not_exist",
"type": "new_api_error",
"param": "",
"code": "task_not_exist"
}
}
Seedance 格式
获取 Seedance 视频任务
- 查询 Seedance 视频生成任务状态。
- 任务完成后可在 result_url 中获取视频链接。
GET
/
v1
/
video
/
generations
/
{task_id}
curl --request GET \
--url 'https://api.elkapi.com/v1/video/generations/task_abc123' \
--header 'Authorization: Bearer <token>'
import requests
url = "https://api.elkapi.com/v1/video/generations/task_abc123"
headers = {
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://api.elkapi.com/v1/video/generations/task_abc123", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
}
});
console.log(await response.json());
{
"code": "success",
"message": "",
"data": {
"task_id": "task_abc123",
"platform": "doubao-video",
"action": "generate",
"status": "SUCCESS",
"progress": "100%",
"result_url": "https://example.com/video.mp4",
"created_at": 1760000000,
"updated_at": 1760000060,
"data": {
"id": "upstream_task_id",
"status": "succeeded",
"content": {
"video_url": "https://example.com/video.mp4"
},
"usage": {
"completion_tokens": 123456,
"total_tokens": 123456
}
}
}
}
{
"error": {
"message": "task_not_exist",
"type": "new_api_error",
"param": "",
"code": "task_not_exist"
}
}
curl --request GET \
--url 'https://api.elkapi.com/v1/video/generations/task_abc123' \
--header 'Authorization: Bearer <token>'
import requests
url = "https://api.elkapi.com/v1/video/generations/task_abc123"
headers = {
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://api.elkapi.com/v1/video/generations/task_abc123", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
}
});
console.log(await response.json());
{
"code": "success",
"message": "",
"data": {
"task_id": "task_abc123",
"platform": "doubao-video",
"action": "generate",
"status": "SUCCESS",
"progress": "100%",
"result_url": "https://example.com/video.mp4",
"created_at": 1760000000,
"updated_at": 1760000060,
"data": {
"id": "upstream_task_id",
"status": "succeeded",
"content": {
"video_url": "https://example.com/video.mp4"
},
"usage": {
"completion_tokens": 123456,
"total_tokens": 123456
}
}
}
}
{
"error": {
"message": "task_not_exist",
"type": "new_api_error",
"param": "",
"code": "task_not_exist"
}
}
Authorizations
string
必填
所有接口均需要使用 Bearer Token 进行认证。
Authorization: Bearer YOUR_API_KEY
Path Parameters
string
必填
创建任务接口返回的
id 或 task_id。Response
string
响应状态。成功时为
success。string
ElkAPI 公开任务 ID。
string
任务平台。Seedance 通常为
doubao-video。string
内部任务状态。常见值:
SUBMITTED、QUEUED、IN_PROGRESS、SUCCESS、FAILUREstring
任务进度。示例:
10%、50%、100%string
任务成功后的结果视频地址。
object
上游原始任务数据,可能包含
content.video_url、usage.total_tokens 等字段。⌘I