Documentation

Doubao Native Video Generation

Call native Doubao video models through the TokenByte unified video API

Different from the Seedance channel

This page uses the TokenByte unified video API with Doubao models. For Wonder models and the SeeDance key group, see Seedance Video Generation.

POSThttps://api.tokenbyte.ai/api/v1/video/generation

使用 TokenByte 统一视频任务接口调用 Doubao 的Doubao Native Video Generation能力。模型名称请从模型市场复制,不要根据厂商官网名称自行推测。

Header 参数

参数必填说明
Authorization是Bearer <TOKENBYTE_API_KEY>
Content-Type是application/json

Body 参数

参数类型必填说明
modelstring是Doubao 模型的完整 ID
_actionstring视模型当前模式使用 t2v
promptstring视模式生成或编辑提示词
imagestring/object/array否参考图 URL、Base64 或厂商结构化图片对象
headtailImagesobject首尾帧模式首帧与尾帧图片
characterImagesarray参考模式主体或风格参考图片
durationinteger否视频时长,枚举取决于模型
resolutionstring否输出尺寸或分辨率
seedinteger否模型支持时控制随机种子

模式说明

输入通常使用扁平字段或 content 内容数组,具体支持项取决于所选模型。

仅传入模型明确支持的字段;不支持的参数可能被忽略或返回参数错误。

请求示例

curl https://api.tokenbyte.ai/api/v1/video/generation \
  -H "Authorization: Bearer $TOKENBYTE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "_action": "t2v",
  "model": "<model-id>",
  "prompt": "描述主体、动作、场景和镜头",
  "duration": 5,
  "resolution": "720p"
}'

响应

{
  "code": 0,
  "data": {
    "task_id": "video_xxx",
    "task_status": "pending",
    "urls": []
  },
  "message": "success",
  "request_id": "req_xxx"
}

若响应直接包含 urls,可立即读取结果;若返回 task_id,请调用查询视频任务直到进入成功或失败终态。