Appearance
视频生成 API
身份验证
http
Authorization: Bearer $ROUTERBEE_API_KEY创建视频任务
http
POST https://routerbee.com/v1/videos
Content-Type: application/json
Idempotency-Key: 每个新视频唯一的值json
{
"model": "seedance-2.0-fast",
"prompt": "A bee flying over a futuristic city at sunset",
"seconds": "5",
"metadata": {
"resolution": "720p",
"ratio": "16:9",
"duration": 5
}
}请求字段
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | RouterBee 对外模型名称 |
prompt | string | 是 | 视频内容、动作、镜头和风格描述 |
seconds | string | 建议 | 视频时长,例如 "5" |
metadata.resolution | string | 建议 | 例如 720p |
metadata.ratio | string | 建议 | 例如 16:9、9:16 |
metadata.duration | number | 建议 | 与 seconds 保持一致 |
创建响应
json
{
"id": "rbjob_example",
"task_id": "rbjob_example",
"object": "video",
"model": "seedance-2.0-fast",
"status": "queued",
"progress": 0
}查询视频任务
http
GET https://routerbee.com/v1/videos/{task_id}| 状态 | 含义 |
|---|---|
queued | 排队中 |
in_progress / running | 正在生成 |
completed / succeeded | 生成成功 |
failed / cancelled | 失败或取消 |
建议每 3–5 秒查询一次。当任务成功后,优先从 result.video_url 读取视频地址。
json
{
"task_id": "rbjob_example",
"status": "completed",
"progress": 100,
"result": {
"video_url": "https://example.com/video.mp4"
}
}