Seedance 视频生成 API 接入文档

🌐 梦想家接入:https://api.alimxj.com

📋 概述

火山方舟 Seedance 视频生成 API 提供多种视频生成模式,支持文生视频、图生视频及多素材组合生成:

模式说明content 类型
文生视频纯文本提示词生成视频text
图生视频参考图片 + 文本生成视频text + image_url
多素材组合图片 + 视频 + 音频 + 文本text + image_url + video_url + audio_url

API 采用火山引擎标准接口协议,支持 Bearer Token 和 HMAC-SHA256 签名两种认证方式。

🔑 认证方式

平台支持双认证模式,可根据安全需求选择:

方式 1:Bearer Token(推荐)

适合快速接入,直接在请求头中携带 API Key:

Authorization: Bearer YOUR_API_KEY

方式 2:HMAC-SHA256 签名(高安全性)

与火山引擎完全兼容的签名认证,提供更高的安全性:

Authorization: HMAC-SHA256 Credential={AccessKeyId}/{Date}/{Region}/{Service}/request, SignedHeaders={SignedHeaders}, Signature={Signature}
X-Date: {YYYYMMDDTHHMMSSZ}

详见 HMAC-SHA256 签名认证 章节。


🌐 Base URL

本服务通过独立 API 域名对外提供,Host 不带端口:

接入环境Base URLHost 头
梦想家 https://api.alimxj.com/v3 api.alimxj.com

📡 API 端点

1. 创建视频生成任务

POST /contents/generations/tasks

完整路径:https://api.alimxj.com/v3/contents/generations/tasks

创建异步视频生成任务,返回任务 ID 用于后续状态查询。

请求参数

参数类型必填说明
modelstring模型名称,支持:doubao-seedance-2-5-betydancedoubao-seedance-2-0-fast-260129-betydancedoubao-seedance-2-0-mini-260616-betydance
contentarray内容数组,支持 text / image_url / video_url / audio_url 四种类型
omni_reference_task_typestring任务类型引导(仅 Seedance 2.5)。可选值:auto(默认,自动识别)、reference(全模态参考)、edit(视频编辑)、extend(视频延长)。首帧/首尾帧生视频不需要此参数,直接用 role 区分
ratiostring视频比例,可选值:16:99:161:14:33:421:9adaptive(自适应,用于视频编辑/续写),默认 16:9
durationinteger生成视频总时长(秒)
resolutionstring分辨率,可选值:480p720p1080p
generate_audioboolean是否自动生成配音,默认 true
watermarkboolean是否添加平台水印,默认 false

content 数组类型

1. 文本提示词 (type = text)

参数类型必填说明
typestring固定值:text
textstring分镜文案。用 图片N / 视频N / 音频N 引用素材(如 图片1、视频1、音频1,按 content 数组顺序从 1 编号)

2. 参考图片 (type = image_url)

参数类型必填说明
typestring固定值:image_url
image_url.urlstring图片 URL(HTTP/HTTPS 或 Base64)
rolestring图片的位置或用途。图生视频-首帧first_frame 或不填;图生视频-首尾帧:首帧 first_frame,尾帧 last_frame(必填);全模态参考生视频reference_image(必填)。所有版本(2.5/2.0/1.5/1.0)通用

3. 参考视频 (type = video_url)

参数类型必填说明
typestring固定值:video_url
video_url.urlstring公网可访问 MP4 视频链接
rolestring固定值:reference_video

4. 参考音频 (type = audio_url)

参数类型必填说明
typestring固定值:audio_url
audio_url.urlstring公网可访问 MP3 音频链接
rolestring固定值:reference_audio

约束说明:

请求示例

示例 1:纯文生视频

curl -X POST "https://api.alimxj.com/v3/contents/generations/tasks" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2-5-betydance",
    "content": [
      {
        "type": "text",
        "text": "一只小猫在草地上追蝴蝶,阳光明媚,4K画质"
      }
    ],
    "ratio": "16:9",
    "duration": 5
  }'

示例 2:图生视频(单张参考图片)

curl -X POST "https://api.alimxj.com/v3/contents/generations/tasks" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2-5-betydance",
    "content": [
      {
        "type": "text",
        "text": "图片1古风少女站在桃花树下,镜头环绕人物旋转,花瓣随风飘落"
      },
      {
        "type": "image_url",
        "image_url": {"url": "https://example.com/girl-portrait.jpg"},
        "role": "reference_image"
      }
    ],
    "duration": 5,
    "ratio": "9:16"
  }'

示例 3:多素材组合(图片 + 视频 + 音频)

curl -X POST "https://api.alimxj.com/v3/contents/generations/tasks" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2-5-betydance",
    "content": [
      {
        "type": "text",
        "text": "图片1里的小猫在图片2的花园里奔跑,配合音频1作为背景音乐"
      },
      {
        "type": "image_url",
        "image_url": {"url": "https://example.com/cat.jpg"},
        "role": "reference_image"
      },
      {
        "type": "image_url",
        "image_url": {"url": "https://example.com/garden.jpg"},
        "role": "reference_image"
      },
      {
        "type": "video_url",
        "video_url": {"url": "https://example.com/reference.mp4"},
        "role": "reference_video"
      },
      {
        "type": "audio_url",
        "audio_url": {"url": "https://example.com/bgm.mp3"},
        "role": "reference_audio"
      }
    ],
    "duration": 7,
    "ratio": "16:9",
    "generate_audio": true
  }'

示例 4:Base64 图片输入

curl -X POST "https://api.alimxj.com/v3/contents/generations/tasks" \
  -H "Authorization: Bearer *** \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2-5-betydance",
    "content": [
      {
        "type": "text",
        "text": "图片1海边落日,海面波光流动,氛围感电影色调"
      },
      {
        "type": "image_url",
        "image_url": {"url": "data:image/jpeg;base64,/9j/4AAQSkZJRg..."},
        "role": "reference_image"
      }
    ],
    "duration": 5,
    "ratio": "16:9"
  }'

示例 5:首帧生视频(所有版本通用)

curl -X POST "https://api.alimxj.com/v3/contents/generations/tasks" \
  -H "Authorization: Bearer *** \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2-5-betydance",
    "content": [
      {
        "type": "text",
        "text": "图中女孩对着镜头说"茄子",360度环绕运镜"
      },
      {
        "type": "image_url",
        "image_url": {"url": "https://example.com/first-frame.jpg"},
        "role": "first_frame"
      }
    ],
    "ratio": "adaptive",
    "duration": 5,
    "generate_audio": true
  }'

示例 6:首尾帧生视频(所有版本通用)

curl -X POST "https://api.alimxj.com/v3/contents/generations/tasks" \
  -H "Authorization: Bearer *** \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2-5-betydance",
    "content": [
      {
        "type": "text",
        "text": "女孩从站立姿势变为挥手,动作流畅自然"
      },
      {
        "type": "image_url",
        "image_url": {"url": "https://example.com/first.jpg"},
        "role": "first_frame"
      },
      {
        "type": "image_url",
        "image_url": {"url": "https://example.com/last.jpg"},
        "role": "last_frame"
      }
    ],
    "ratio": "adaptive",
    "duration": 5,
    "generate_audio": true
  }'

示例 7:全模态参考生视频(Seedance 2.5) — 使用 role: "reference_image" + omni_reference_task_type

curl -X POST "https://api.alimxj.com/v3/contents/generations/tasks" \
  -H "Authorization: Bearer *** \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2-5-betydance",
    "content": [
      {
        "type": "text",
        "text": "图片1里的小猫在花园里奔跑"
      },
      {
        "type": "image_url",
        "image_url": {"url": "https://example.com/cat.jpg"},
        "role": "reference_image"
      }
    ],
    "omni_reference_task_type": "reference",
    "ratio": "16:9",
    "duration": 5,
    "generate_audio": true
  }'

成功响应

{
  "output": {
    "task_id": "a72f41c9-12b3-4e5f-8d9c-xxxxxxxxxxxx",
    "task_status": "PENDING"
  },
  "request_id": "81df29ac-173b-4021-a69f-xxxxxxxxxxxx",
  "model": "doubao-seedance-2-5-betydance"
}

响应字段说明

字段类型说明
output.task_idstring任务 ID,用于查询任务状态
output.task_statusstring任务状态:PENDING(排队中)
request_idstring请求唯一标识
modelstring使用的模型名称

错误响应

{
  "error": {
    "message": "错误描述",
    "type": "错误类型"
  }
}

常见错误类型:


2. 查询视频生成任务

GET /contents/generations/tasks/{task_id}

完整路径:https://api.alimxj.com/v3/contents/generations/tasks/{task_id}

查询已创建的视频生成任务状态和结果。

路径参数

参数类型必填说明
task_idstring任务 ID(创建任务时返回的 output.task_id 字段)

请求示例

curl -X GET "https://api.alimxj.com/v3/contents/generations/tasks/task_91b0550251e547948f36287e" \
  -H "Authorization: Bearer YOUR_API_KEY"

任务处理中响应

{
  "id": "a72f41c9-12b3-4e5f-8d9c-xxxxxxxxxxxx",
  "task_id": "a72f41c9-12b3-4e5f-8d9c-xxxxxxxxxxxx",
  "model": "doubao-seedance-2-5-betydance",
  "status": "running",
  "created_at": 1782891873,
  "updated_at": 1782891873
}

任务成功响应

{
  "id": "a72f41c9-12b3-4e5f-8d9c-xxxxxxxxxxxx",
  "task_id": "a72f41c9-12b3-4e5f-8d9c-xxxxxxxxxxxx",
  "status": "succeeded",
  "content": {
    "video_url": "https://ark-acg-cn-beijing.tos-cn-beijing.volces.com/doubao-seedance-2-5/xxxxxxxx.mp4?X-Tos-Algorithm=..."
  },
  "model": "doubao-seedance-2-5-betydance",
  "ratio": "16:9",
  "resolution": "720p",
  "duration": 5,
  "usage": {
    "total_tokens": 108900,
    "completion_tokens": 108900
  },
  "created_at": 1782891873,
  "updated_at": 1782892090
}

响应字段说明

字段类型说明
idstring任务 ID
task_idstringid
statusstring任务状态:running(处理中)/ succeeded(成功)/ failed(失败)
content.video_urlstring视频下载 URL(仅 succeeded 时返回,24h 有效)
modelstring模型名称
ratiostring视频宽高比
resolutionstring分辨率,如 720p1080p
durationinteger视频时长(秒)
seedinteger生成种子(可用于复现相同结果)
framespersecondinteger帧率(fps)
execution_expires_afterinteger结果过期时间(秒),默认 172800(48h)
created_atinteger创建时间(Unix 时间戳)
updated_atinteger更新时间(Unix 时间戳)
usage.total_tokensinteger总 Token 消耗
usage.completion_tokensinteger生成 Token 数
usage.SRinteger分辨率档位(720 / 1080)
usage.durationinteger视频时长(秒)
usage.ratiostring宽高比

🔐 HMAC-SHA256 签名认证

认证流程

  1. 客户端使用 SecretAccessKey 对请求进行签名
  2. 服务端使用相同的 SecretAccessKey 验证签名
  3. 签名包含时间戳,防止重放攻击(有效期 5 分钟)

必需参数

参数说明示例
AccessKeyId访问密钥 ID(即 API Key)tk-bb94a758...
SecretAccessKey访问密钥 Secretsk_xxx...
Region区域(固定值)cn-beijing
Service服务名(固定值)volcengine

签名步骤

步骤 1:构建 CanonicalRequest

HTTPMethod
CanonicalURI
CanonicalQueryString
CanonicalHeaders
SignedHeaders
HashedPayload

示例:

POST
/v3/contents/generations/tasks

content-type:application/json
host:api.alimxj.com
x-date:20260821T081000Z

content-type;host;x-date
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

说明:

步骤 2:构建 StringToSign

HMAC-SHA256
{X-Date}
{CredentialScope}
{HashedCanonicalRequest}

示例:

HMAC-SHA256
20260821T081000Z
20260821/cn-beijing/volcengine/request
a098d2841e0452ec987a2b017a305befed481d39ea335810b8a8455be9e4cb2f

说明:

步骤 3:密钥派生

k_date = HMAC-SHA256(SecretAccessKey, Date)
k_region = HMAC-SHA256(k_date, Region)
k_service = HMAC-SHA256(k_region, Service)
k_signing = HMAC-SHA256(k_service, "request")

步骤 4:计算签名

signature = HMAC-SHA256(k_signing, StringToSign)

步骤 5:构建 Authorization 头

HMAC-SHA256 Credential={AccessKeyId}/{CredentialScope}, SignedHeaders={SignedHeaders}, Signature={Signature}

⚠️ Host Header 注意事项

签名时 Host 必须与服务端实际看到的 Host 一致。本服务对外 Host 为:

场景Host 值
梦想家接入api.alimxj.com(不带端口)
本地测试127.0.0.1

Python 完整示例

import hmac
import hashlib
import requests
import json
from datetime import datetime, timezone
from urllib.parse import urlparse

class VolcengineSigner:
    """火山引擎签名器"""

    def __init__(self, access_key_id, secret_access_key, region='cn-beijing', service='volcengine'):
        self.access_key_id = access_key_id
        self.secret_access_key = secret_access_key
        self.region = region
        self.service = service

    def sign_request(self, method, url, headers, body=''):
        parsed = urlparse(url)
        host = parsed.netloc
        path = parsed.path or '/'
        query_string = parsed.query

        now = datetime.now(timezone.utc)
        x_date = now.strftime('%Y%m%dT%H%M%SZ')
        short_date = now.strftime('%Y%m%d')

        headers_to_sign = {
            'host': host,
            'content-type': headers.get('Content-Type', 'application/json'),
            'x-date': x_date
        }
        signed_headers_list = sorted(headers_to_sign.keys())
        signed_headers = ';'.join(signed_headers_list)

        canonical_headers = ''
        for key in signed_headers_list:
            canonical_headers += f"{key}:{headers_to_sign[key].strip()}\n"

        body_hash = hashlib.sha256(body.encode('utf-8')).hexdigest()

        canonical_request = (
            f"{method}\n"
            f"{path}\n"
            f"{query_string}\n"
            f"{canonical_headers}\n"
            f"{signed_headers}\n"
            f"{body_hash}"
        )

        credential_scope = f"{short_date}/{self.region}/{self.service}/request"
        string_to_sign = (
            f"HMAC-SHA256\n"
            f"{x_date}\n"
            f"{credential_scope}\n"
            f"{hashlib.sha256(canonical_request.encode('utf-8')).hexdigest()}"
        )

        k_date = hmac.new(self.secret_access_key.encode(), short_date.encode(), hashlib.sha256).digest()
        k_region = hmac.new(k_date, self.region.encode(), hashlib.sha256).digest()
        k_service = hmac.new(k_region, self.service.encode(), hashlib.sha256).digest()
        k_signing = hmac.new(k_service, b"request", hashlib.sha256).digest()
        signature = hmac.new(k_signing, string_to_sign.encode('utf-8'), hashlib.sha256).hexdigest()

        authorization = (
            f"HMAC-SHA256 "
            f"Credential={self.access_key_id}/{credential_scope}, "
            f"SignedHeaders={signed_headers}, "
            f"Signature={signature}"
        )

        result_headers = headers.copy()
        result_headers['X-Date'] = x_date
        result_headers['Authorization'] = authorization
        return result_headers


# 使用示例
if __name__ == "__main__":
    ACCESS_KEY_ID = "YOUR_API_KEY"
    SECRET_ACCESS_KEY = "YOUR_SECRET_KEY"
    BASE_URL = "https://api.alimxj.com"

    signer = VolcengineSigner(ACCESS_KEY_ID, SECRET_ACCESS_KEY)

    url = f"{BASE_URL}/v3/contents/generations/tasks"
    headers = {'Content-Type': 'application/json'}
    data = {
        "model": "doubao-seedance-2-5-betydance",
        "content": [{"type": "text", "text": "一只小猫在草地上追蝴蝶"}],
        "ratio": "16:9",
        "duration": 5
    }
    body = json.dumps(data, ensure_ascii=False)

    signed_headers = signer.sign_request('POST', url, headers, body)
    response = requests.post(url, headers=signed_headers, data=body.encode('utf-8'))
    print(f"状态码: {response.status_code}")
    print(f"响应: {json.dumps(response.json(), ensure_ascii=False, indent=2)}")

签名错误排查

错误可能原因解决方案
Signature verification failedHost 不匹配确保签名的 Host 与服务端一致
Signature verification failed时间戳过期检查系统时间,确保在 5 分钟内
Invalid Authorization header格式错误检查 Authorization 头格式
Invalid AccessKeyIdAPI Key 错误检查 AccessKeyId 是否正确

📦 资产管理接口

资产管理接口用于管理视频生成所需的参考素材(图片、视频、音频)。通过 asset:// 协议可在视频生成任务中引用已上传的素材。

接口入口

POST /api/asset?Action=<Action>&Version=2024-01-01

完整路径:https://api.alimxj.com/v1/api/asset?Action=<Action>&Version=2024-01-01

Action 列表

Action说明章节
CreateAssetGroup创建素材组素材组管理
ListAssetGroups列出素材组素材组管理
GetAssetGroup查询单个素材组素材组管理
UpdateAssetGroup更新素材组素材组管理
DeleteAssetGroup删除素材组素材组管理
CreateAsset创建素材素材管理
ListAssets列出素材素材管理
GetAsset查询单个素材素材管理
UpdateAsset更新素材素材管理
DeleteAsset删除素材素材管理
CreateVisualValidateSession创建视觉校验会话(真人认证)视觉校验
GetVisualValidateResult查询视觉校验结果视觉校验

素材组管理

CreateAssetGroup — 创建素材组

请求字段类型必填说明
Namestring组名(同 key 下唯一)
Descriptionstring组描述
GroupTypestring组类型,仅支持 AIGC(默认)
curl -X POST "https://api.alimxj.com/v1/api/asset?Action=CreateAssetGroup&Version=2024-01-01" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"Name":"测试组","Description":"用于视频参考的图片","GroupType":"AIGC"}'

ListAssetGroups — 列出素材组

请求字段类型必填说明
Filter.Namestring按组名过滤(模糊匹配)
PageNumberint页码,默认 1
PageSizeint每页条数,默认 10

GetAssetGroup — 查询单个素材组

请求字段类型必填说明
Idstring组 Id

UpdateAssetGroup — 更新素材组

请求字段类型必填说明
Idstring组 Id
Namestring新组名
Descriptionstring新描述
curl -X POST "https://api.alimxj.com/v1/api/asset?Action=UpdateAssetGroup&Version=2024-01-01" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer *** \
  -d '{"Id":"187507198107058200","Name":"新名字","Description":"新描述"}'

DeleteAssetGroup — 删除素材组

请求字段类型必填说明
Idstring组 Id

素材管理

CreateAsset — 创建素材

请求字段类型必填说明
Namestring素材名
GroupIdstring所属组 Id
URLstring素材资源 URL
AssetTypestringImage / Video / Audio

异步就绪:素材创建后 Status 初始为 Processing,就绪后变 Active仅 Active 素材可用于视频 asset:// 引用

ListAssets — 列出素材

请求字段类型必填说明
Filter.GroupIdsstring[]按组 Id 列表过滤
PageNumberint页码,默认 1
PageSizeint每页条数,默认 10

GetAsset — 查询单个素材

请求字段类型必填说明
Idstring素材 Id

UpdateAsset — 更新素材

请求字段类型必填说明
Idstring素材 Id
Namestring新素材名
curl -X POST "https://api.alimxj.com/v1/api/asset?Action=UpdateAsset&Version=2024-01-01" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer *** \
  -d '{"Id":"182533555060998168","Name":"新名字"}'

DeleteAsset — 删除素材

请求字段类型必填说明
Idstring素材 Id

视频生成中的 asset:// 引用

视频生成接口的 content 数组里,可用 asset://<Id> 引用已创建的素材替代公网 URL。

引用写法

// 图片引用
{"type":"image_url","role":"reference_image","image_url":{"url":"asset://<AssetId>"}}

// 视频引用
{"type":"video_url","role":"reference_video","video_url":{"url":"asset://<AssetId>"}}

// 音频引用
{"type":"audio_url","role":"reference_audio","audio_url":{"url":"asset://<AssetId>"}}

归属校验

场景结果
引用自己 key 下的 Active 素材200 放行
引用他人 key 下的素材403 asset not owned by key
无 asset:// 引用(纯文生视频)200 不校验

私有隔离:所有查询/更新/删除操作带 key 归属过滤,只能操作自己 key 下的组与素材。


🔍 视觉校验(真人认证)

视觉校验用于真人活体认证。调用 CreateVisualValidateSession 创建认证会话,上游返回 BytedToken;用户在 H5 页面完成认证后,调用 GetVisualValidateResult 查询结果,认证成功后自动回填 GroupId 并将组转为 active

CreateVisualValidateSession — 创建视觉校验会话

请求字段类型必填说明
CallbackURLstring认证结果回调 URL
curl -X POST "https://api.alimxj.com/v1/api/asset?Action=CreateVisualValidateSession&Version=2024-01-01" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer *** \
  -d '{"CallbackURL":"https://example.com/callback"}'

响应示例:

{
  "ResponseMetadata": {
    "Action": "CreateVisualValidateSession",
    "Region": "cn-beijing",
    "RequestId": "20260811151901191F12565842363DCE4D",
    "Service": "ark",
    "Version": "2024-01-01"
  },
  "Result": {
    "BytedToken": "202608111519011904A1CECB71B3B798C0",
    "CallbackURL": "https://example.com/callback",
    "H5Link": "https://ark.volcengine.com/region:cn-beijing/mobile/livenees-face-manage/authorization?pl=<token>&uid=<uid>"
  }
}

字段说明:

GetVisualValidateResult — 查询视觉校验结果

请求字段类型必填说明
BytedTokenstring创建会话时返回的 BytedToken
curl -X POST "https://api.alimxj.com/v1/api/asset?Action=GetVisualValidateResult&Version=2024-01-01" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer *** \
  -d '{"BytedToken":"202608111519011904A1CECB71B3B798C0"}'

响应示例(认证成功):

{
  "ResponseMetadata": {
    "Action": "GetVisualValidateResult",
    "Region": "cn-beijing",
    "RequestId": "2026081116104914FE6115A8A9CFD08C2C2C",
    "Service": "ark",
    "Version": "2024-01-01"
  },
  "Result": {
    "GroupId": "group-20260811161038-fdjdf"
  }
}

字段说明:

与 AIGC 组的区别:真人组(LivenessFace不能通过 CreateAssetGroup 创建,只能通过 CreateVisualValidateSession 创建;其生命周期由认证状态驱动(pending → active / failed)。


📋 任务管理

查询任务列表

GET /contents/generations/tasks

完整路径:https://api.alimxj.com/v3/contents/generations/tasks

查询当前 API Key 下的所有视频生成任务。

参数类型必填说明
page_numinteger页码,默认 1
page_sizeinteger每页条数,默认 10,最大 100
filter.statusstring按状态过滤:running / succeeded / failed
filter.modelstring按模型名称过滤
curl -X GET "https://api.alimxj.com/v3/contents/generations/tasks?page_num=1&page_size=5&filter.status=succeeded" \
  -H "Authorization: Bearer ***

响应示例:

{
  "items": [
    {
      "id": "task_039143e03c974564bfed4d07",
      "model": "doubao-seedance-2-5-betydance",
      "status": "succeeded",
      "content": {
        "video_url": "https://ark-acg-cn-beijing.tos-cn-beijing.volces.com/..."
      },
      "ratio": "16:9",
      "resolution": "720p",
      "duration": 5,
      "usage": {
        "total_tokens": 108000,
        "completion_tokens": 108000
      },
      "created_at": 1788395939,
      "updated_at": 1788395939
    }
  ],
  "page_num": 1,
  "page_size": 5,
  "total": 10
}

取消/删除任务

DELETE /contents/generations/tasks/{task_id}

完整路径:https://api.alimxj.com/v3/contents/generations/tasks/{task_id}

取消正在处理的任务或删除已完成的任务记录。

参数类型必填说明
task_idstring任务 ID(路径参数)

行为说明:

curl -X DELETE "https://api.alimxj.com/v3/contents/generations/tasks/task_039143e03c974564bfed4d07" \
  -H "Authorization: Bearer ***

成功响应:返回空对象 {}


📝 注意事项