API 接口与模型调度
下载 OpenAPI 3.1 定义 · 打开故事操作手册。本页与项目一起发布,无需外部 Swagger 服务。在 Postman 中选择 Import,导入下载的 JSON 文件,即可按接口查看方法、路径、查询参数、请求头与请求体模型,展开 components.schemas 查看字段类型、必填项和约束。导入后请按下文配置会话或 Bearer、CSRF 和幂等键。自动定义中,部分动态响应未声明字段,文件下载、事件流也可能被标成 JSON;实际返回类型和业务字段请使用对应章节。
Postman 快速开始
- 建立本地环境变量
baseUrl,值为网站地址加/api。示例使用相对路径;导入的 OpenAPI 路径已包含/api,避免拼接两次。 - 发送
POST {{baseUrl}}/auth/login。Body 选择 raw → JSON,使用{"username":"{{username}}","password":"{{password}}"},两个变量均使用个人环境的本地值。Cookie Jar 将保存 cmvr_session。登录请求的 Post-response 脚本用下方第一行保存 CSRF。 - 以相同会话发送
GET {{baseUrl}}/capabilities,按任务类型、profile、画幅检查是否可用。上传图片时用POST {{baseUrl}}/assets,Body 选 form-data,键 file 类型选 File;成功后将 id 存为 imageId。 - 发送
POST {{baseUrl}}/jobs,添加X-CSRF-Token: {{csrf}}与Idempotency-Key: {{requestKey}}。每项新任务先生成一个新的 UUID 放入 requestKey;网络重发沿用原值。选择下文一份 JSON 作为 Body,把示例素材 ID 换成本人上传记录的 ID。提交请求的 Post-response 脚本用下方第二行保存任务 ID。 - 用
GET {{baseUrl}}/jobs/{{jobId}}查询。成功后在 result_assets 选取需要的素材并保存它的 id;GET {{baseUrl}}/assets/{{assetId}}/content?download=1返回原始文件。数学推演另可从 result.text 直接读取结果。
// 登录请求的 Post-response
if (pm.response.code === 200) pm.environment.set("csrf", pm.response.json().csrf_token);// POST /jobs 的 Post-response
if (pm.response.code === 202) pm.environment.set("jobId", pm.response.json().jobs[0].id);1 服务地址与接口约定
1.1 地址
| 项目 | 值或含义 |
|---|---|
| 生产网站 | https://video.svc.cmvr-iot.icu/ |
| 生产 API 根地址 | https://video.svc.cmvr-iot.icu/api,下文记为 API_BASE |
| 局域网备用网站与 API | http://192.168.28.10:18193/ 与 http://192.168.28.10:18193/api;优先使用 HTTPS |
| 本地开发网站 | http://127.0.0.1:5173 |
| 本地业务 API | http://127.0.0.1:8000/api |
| 下文路径 | 均相对于 API_BASE,例如 /jobs |
| 请求编码 | JSON 使用 UTF-8,Content-Type: application/json;上传使用 multipart |
| 时间 | ISO 8601,带 Z 或时区偏移;响应通常为 UTC |
| ID | 使用服务器返回的原始 ID;通常为 32 位小写十六进制字符串 |
FastAPI 在业务后端自身提供 /openapi.json、/docs;它们不带 /api 前缀。现有网站反代只明确代理 /api/,因此不能据此认定网站域名的 /docs 可访问,也不能把 /api/docs、/api/openapi.json 当作已经存在的接口。本文采用 Swagger 风格并不改变真实路由。
自动 OpenAPI 能描述 HTTP 外层模型;POST /jobs 的 input、parameters 为动态对象,模型特定字段还受业务合同校验。各任务的详细参数以下文及实时能力响应为准。示例响应为主要字段示例,实际 DTO 可能另有版本、来源和审计字段。
1.2 生产时段
生产保留 GPU_WINDOW_ENABLED=true,北京时间 Asia/Shanghai 的准入窗口为每天 21:00 至次日 08:00,交互和批量两种队列均受控。白天可登录、上传、编辑、提交排队、查询和下载已有成果;提交成功不代表立即执行。
08:00 时已经获准执行的阶段允许完成,后续阶段等待下一窗口。当前业务协调器的阶段准入也覆盖 CPU 合成和 Qwen 推演,不能假定“CPU 任务白天一定立即执行”。本地开发使用 GPU_WINDOW_ENABLED=false,与生产配置独立。
客户端不能传 GPU_WINDOW_ENABLED、gpu_window_enabled、gpu_id、docker_id 或任意系统命令来豁免调度。execution_mode=interactive 表示队列类别,不是全天算力通行证。
1.3 通用请求头
| 请求头 | 何时提供 | 规则 |
|---|---|---|
Cookie | 会话鉴权 | 登录后客户端自动保存 cmvr_session,不要自行构造 |
X-CSRF-Token | 会话写请求 | 登录响应中的 token;用于 POST、PATCH、DELETE 等 |
Authorization | 机器程序 | Bearer cmvr_...;与浏览器 Cookie 方案分开使用 |
Idempotency-Key | 生成、运行及有关控制命令 | 建议 UUID;长度 1–128;同一业务意图保持同键、同参数 |
If-Match | 使用版本 CAS 的 PATCH/DELETE | 对象最近读取到的版本;具体接口见后文 |
Last-Event-ID | SSE 断线续接 | 非负整数事件游标 |
除明确标注允许外,不增加未知字段。布尔字段应传 JSON true / false,不能传字符串;整数不能用小数或布尔值冒充。素材输入使用本人已上传的素材 ID,不接受服务器绝对路径或任意外部 URL。
2 登录与机器鉴权
2.1 POST /auth/login
用途:建立浏览器或脚本会话。请求无须登录;成功返回 HTTP 200 并设置 HttpOnly Cookie。
| JSON 字段 | 类型 | 必填 | 默认值 | 约束 |
|---|---|---|---|---|
username | string | 是 | 无 | 1–64 字符 |
password | string | 是 | 无 | 1–256 字符,使用现有账户密码 |
{"username":"example_user","password":"<从安全输入读取>"}{
"user":{"id":"11111111111111111111111111111111","username":"example_user","display_name":"示例用户","role":"user"},
"csrf_token":"<仅用于本会话的CSRF值>"
}Cookie 与 CSRF 都是敏感数据,不输出到日志或文档。没有公开注册接口。管理员可新增账户;被禁用或删除的账户不能继续使用 API。GET /auth/me 读取当前身份;POST /auth/logout 注销会话,成功为 HTTP 204。修改密码、用户名使用会话接口,不使用模型推理密钥。
2.2 POST /auth/tokens
用途:为当前用户创建机器令牌,必须使用登录会话和 CSRF。成功 HTTP 201,明文 token 仅在创建时返回一次;不能用已有机器令牌创建新令牌。
| JSON 字段 | 类型 | 必填 | 默认值 | 约束 |
|---|---|---|---|---|
name | string | 是 | 无 | 1–128 字符 |
scopes | string[] | 是 | 无 | 最多 20 个,仅下表允许值 |
expires_at | string 或 null | 否 | null | 带时区的将来时间;建议设置 |
{
"name":"业务调度程序",
"scopes":["jobs:read","jobs:write","assets:read","assets:write","events:read"],
"expires_at":"2027-01-01T00:00:00+08:00"
}{
"token":"cmvr_<只返回一次的随机值>",
"record":{"id":"22222222222222222222222222222222","name":"业务调度程序","scopes":["jobs:read","jobs:write","assets:read","assets:write","events:read"],"expires_at":"2026-12-31T16:00:00.000Z","revoked_at":null}
}| scope | 用途 |
|---|---|
jobs:read / jobs:write | 查询 / 提交、取消、重试任务 |
assets:read / assets:write | 查询、下载 / 上传、编辑素材及共享素材操作 |
folders:read / folders:write | 分类读取 / 修改 |
workflows:read / workflows:write | 故事、编辑器、运行的读取 / 写入 |
batches:read / batches:write | 批次读取 / 创建和控制 |
events:read | SSE 事件流 |
interactive:write | 机器令牌提交交互队列时的额外权限 |
机器程序使用 Authorization: Bearer <token>,不要同时携带会话 Cookie 或浏览器的 Sec-Fetch-Site 请求头。这是本项目数据库管理的随机令牌,不是 JWT,也不是上游模型 API Key。令牌始终继承所属用户的资源隔离,不具有管理员身份。
GET /auth/tokens 返回当前会话用户的令牌记录,DELETE /auth/tokens/{token_id} 吊销,HTTP 204。即使 scope 足够,execution_mode=interactive 仍额外需要 interactive:write;生产时段限制不会因此取消。
当前版本限制:能力和状态路由在机器鉴权时会分别匹配 capabilities:read、system:read,但可创建 scope 清单不包含这两项。因此能力查询示例使用登录会话;不能通过创建不存在的权限值绕过这一限制。
2.3 账户管理接口
以下均使用登录会话,写操作带 CSRF。用户管理只允许管理员会话;机器令牌不会获得管理员角色。
| 方法和路径 | JSON 主要字段 | 权限与说明 |
|---|---|---|
GET /auth/users | 无;query page/page_size | 管理员用户列表 |
POST /auth/users | username、display_name、password | 管理员新增;初始密码允许 6 位数字,用户名按服务规则校验 |
PATCH /auth/users/{user_id} | disabled,可选 display_name | 管理员禁用/启用;禁用保留资源但阻止登录和操作 |
DELETE /auth/users/{user_id} | 无 | 管理员永久删除用户及其受控资源,活动工作须按删除流程清理 |
POST /auth/password | current_password、new_password | 当前用户改密;新密码仍要求至少 12 字符,成功后按返回提示重新登录 |
POST /auth/username | username、current_password | 当前用户改用户名,核对密码并按返回提示重新登录 |
管理员不能删除最后一个可用管理员或绕过项目对自身账号的保护。删除账户属于资源清理操作,不能用“禁用账户”替代,也不要在自动模型调用脚本中默认执行。
3 能力与调度状态
3.1 GET /capabilities
鉴权:当前使用登录会话。用途:读取任务支持情况、模型 profile、默认参数、范围、原生对白门禁与调度窗口。HTTP 200。
{
"items":[
{"task_type":"video.generate","available":true,"model":"MiniMax H3 原生音视频","video_profiles":[{"profile":"minimax-h3-fl2va-native-av-tp2-v1","available":true,"reason":null,"canvases":[[1344,768]],"defaults":{"width":1344,"height":768,"num_frames":124,"fps":24,"upscale":false},"constraints":{"num_frames":{"min":124,"max":158,"step":17}}},{"profile":"minimax-h3-fl2va-native-av-v1","available":false,"reason":"尚未启用或未完成独立实测认证","canvases":[]}]}
],
"dialogue":{"native_av":{"available":true,"production_available":true,"languages":["Chinese"],"supports_two_faces":false,"max_visible_speakers":1,"readiness":{"generation":true,"word_alignment":true,"visual_review":true},"reason":null}},
"execution_policy":{"timezone":"Asia/Shanghai","start":"21:00","end":"08:00","batch_window_enabled":true,"batch_open":false,"close_behavior":"finish_current","next_batch_at":"2026-11-27T13:00:00+00:00","configuration_error":null},
"workflow_limits":{"max_shots":60,"fps":24},
"scheduler":{"available":true,"state":"ready","gpus":[]}
}上例为主要字段节选,其中可用状态仅说明字段形状,不代替部署后的实时状态。实际视频配置在 items[task_type=video.generate].video_profiles[] 中,读取目标 profile 自己的 available、reason、canvases、defaults、constraints。原生 canvases 只列实际认证的 [width,height] 组合;上例为 [[1344,768]],未认证或关闭时为 []。即使 available=true,也不能提交列表外的画布;分别读取 width/height 的理论数值范围不能替代组合检查。
同一模型族的静音视频、原生有声、单卡、双卡及不同画幅可能有不同验收结果。按本次提交要用的 profile 和 canvases 选择。
3.2 GET /system/status
HTTP 200,返回 inference_online、scheduler、models、environment、database_backend、execution_policy、workflow_limits、public_access。用于运维观察;inference_online=true 只代表上游健康,不保证指定模型已经完成认证。
当前没有对业务用户公开的 POST /scheduler/run、POST /gpu/allocate 或任意启动容器接口。调用调度器的正式方式是向 /jobs、/editors/{id}/runs 或 /batches 提交受控业务命令。后台依据资源阶段获得 new_gpu、cpu_media、qwen_http 槽位,客户端只选择任务意图与支持的参数。
3.3 GET /live 与 GET /ready
这两个接口不要求登录。/live 返回 {"status":"ok"},检查进程活性;/ready 在数据库、协调器、上游协议与准入检查均通过时返回 HTTP 200,否则 HTTP 503。
{"status":"ready","checks":{"database":true,"coordinator":true,"upstream_protocol":true,"accepting":true}}GPU 忙或等待夜间窗口不是进程故障;不需要因此重启网站或重复提交任务。
4 通用任务提交与返回结构
4.1 POST /jobs
鉴权:会话及 CSRF,或 jobs:write;交互机器任务还需 interactive:write。请求为 JSON,建议始终携带 Idempotency-Key。成功 HTTP 202,返回 {"jobs":[JobDTO]}。
| 字段 | 类型 | 必填 | 默认值 | 约束和说明 |
|---|---|---|---|---|
task_type | string | 是 | 无 | 使用后续任务清单支持的名字 |
input | object | 否 | {} | 提示词与本人素材 ID;具体必填项由任务决定 |
parameters | object | 否 | {} | 模型参数;未知字段拒绝 |
execution_mode | string | 否 | interactive | interactive 或 batch |
count | integer | 否 | 1 | 1–4;多份仅限图片、参考图片、缺陷样本任务;各份种子递增 |
scheduled_at | datetime 或 null | 否 | null | 必须带时区;将来时间会先处于 scheduled |
folder_id | string 或 null | 否 | null | 任务记录所在本人分类 |
output_folder_id | string 或 null | 否 | 未传时继承 folder_id | 显式 null 表示成果不继承分类 |
{
"task_type":"image.generate",
"execution_mode":"batch",
"input":{"prompt":"白色背景上的蓝色陶瓷杯,自然柔光"},
"parameters":{"width":1024,"height":1024,"num_inference_steps":50,"seed":42,"guidance_scale":4.0},
"count":1
}{
"jobs":[{
"id":"33333333333333333333333333333333",
"task_type":"image.generate",
"state":"submitting",
"phase":"waiting_dispatch",
"version":1,
"execution_mode":"batch",
"desired_state":"run",
"hold_reasons":[],
"result_assets":[],
"result":null,
"progress":null,
"queue_position":null,
"attempt_count":0,
"preemptions":0,
"error":null,
"sync_warning":null,
"cancel_requested":false
}]
}HTTP 202 只表示意图已经接纳,首个状态也可能因定时或调度推进而不同。不要把 progress=null 解释成 0%,也不要编造模型生成百分比。任务 ID 是业务任务 ID,不是 GPU PID。
4.2 JobDTO 主要字段
| 字段 | 类型 | 含义 |
|---|---|---|
id | string | 持久业务任务 ID |
task_type、parameters | string、object | 已提交任务类型及公开参数 |
state、phase | string | 生命周期状态、当前阶段 |
version | integer | 对象版本,用于一致读取及有关删除控制 |
hold_reasons | string[] | 等待原因,如窗口等待;不是新的生成请求 |
run_id、step_key、batch_id | string 或 null | 所属故事运行或批次 |
result_assets | AssetDTO[] | 已归档、可访问的成果 |
result | object 或 null | 文本、识别、模型实测元数据等,随任务变化 |
error | object 或 null | 失败 code/message 等,不直接向终端用户展示内部路径 |
sync_warning | string 或 null | 上游查询、下载或归档恢复提示,不应自动另建任务 |
attempt_count | integer | 上游尝试数 |
explicit_attempt | integer | 用户明确重试代次 |
preemptions | integer | 让卡次数,可能重新排队 |
created_at、scheduled_at、started_at、finished_at | datetime 或 null | 时间线 |
常见状态包括 scheduled、submitting、queued、running、collecting、cancelling、succeeded、failed、cancelled、timed_out、needs_attention。cancel_requested 是独立布尔字段,不是这里的取消中状态名称。读取实际 state 和 phase,不要仅凭页面文字推断状态。上游结束后归档未完成时仍可能是 collecting;自动让卡不等于用户取消。
不同任务使用同一个 JobDTO 外层,模型结果的读取位置如下。result_assets 中每项都是可继续查询或下载的 AssetDTO,不能把上游文件路径当作下载地址。
| 任务 | 成功后的主要读取位置 |
|---|---|
image.generate、image.reference.generate | result_assets 中的图片;result 为实际生成元数据 |
defect.generate | 保存全部相关图片成果,包括生成样本和控制图;不返回缺陷真值掩膜 |
原生 video.generate | result_assets 中的有声 MP4 和独立 WAV;实测元数据在 result.native_av |
math.solve | result.text,以及文本和 JSON 素材 |
media.structure | result.subjects/scene/ocr/tags/frames,以及结构化 JSON 素材 |
audio.transcribe | result.text 和 result.segments,以及转写成果;通用分段不是字词口型证据 |
video.compose | result_assets 中的成片视频;完整故事验收需查父运行及质检成果 |
4.3 GET /jobs 与 GET /jobs/{job_id}
鉴权:会话或 jobs:read。列表返回 items,total,page,page_size,cursor;详情直接返回 JobDTO。
| 列表 query | 类型 | 默认值 | 说明 |
|---|---|---|---|
page | integer | 1 | 从 1 开始 |
page_size | integer | 24 | 常规 1–100,以服务校验为准 |
folder_id | string | "" | 本人分类筛选 |
task_type、state | string | "" | 类型、状态筛选 |
root_only | boolean | false | 排除所属运行的子任务 |
建议每 2–5 秒轮询一次目标任务,状态 succeeded 后读取 result_assets。needs_attention 表示执行结果或清理状态需核对,不能通过新增同类任务掩盖未知结果。
4.4 取消 重试 删除
| 方法和路径 | 请求 | 成功 | 行为 |
|---|---|---|---|
POST /jobs/{id}/cancel | 无 JSON 必填字段;会话仍需 CSRF | 200 JobDTO | 请求取消,实际退出与清理异步确认 |
POST /jobs/{id}/retry | 建议新的 Idempotency-Key | 202 {"jobs":[...]} | 对可重试的失败任务发起明确重试;不是超时恢复操作 |
DELETE /jobs/{id} | 按对象要求提供 If-Match | 200 | 清理任务记录及其受控成果;活动任务须先取消并等清理完成 |
故事工作流子任务应由父运行控制,不要绕过父图单独重试;错误响应会提示相应父运行。删除与取消是不同操作;删除不会变成一个可安全忽略的“隐藏按钮”。
4.5 GET /submissions/{key}
query operation 必填。用于响应丢失后恢复业务意图,HTTP 200。
GET /submissions/8ebc5e83-52cf-4428-a1bb-754528199212?operation=jobs.create{"key":"8ebc5e83-52cf-4428-a1bb-754528199212","operation":"jobs.create","status":"accepted","resource_json":{"job_ids":["33333333333333333333333333333333"]},"job_ids":["33333333333333333333333333333333"]}常用 operation 有 jobs.create、jobs.retry、editor.save、editor.dialogue.enable 及接口对应的运行命令。客户端应在发请求前保存幂等键、完整 body、操作名和返回 ID。404 只表示尚未找到,重放仍必须使用原键与原 body;410 表示原结果已清理,不能用旧键强行重建;409 表示同键被用于不同参数。
5 素材上传与成果下载
5.1 POST /assets
鉴权:会话及 CSRF,或 assets:write。使用 multipart,成功 HTTP 201,返回 AssetDTO。
| form 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
file | binary | 是 | 实际图片、音视频等文件,不是服务器路径 |
name | string | 否 | 显示名,默认由上传文件名取得 |
folder_id | string | 否 | 本人分类 ID |
默认单文件上限 512 MiB,实际还受反代、用户存储配额和格式检查约束。不要将 API Key、密码或无关服务器文件上传为素材。
{
"id":"44444444444444444444444444444444",
"name":"speaker.png",
"kind":"image",
"mime_type":"image/png",
"size_bytes":350000,
"width":1344,
"height":768,
"duration_seconds":null,
"preview_url":"/api/assets/44444444444444444444444444444444/content",
"download_url":"/api/assets/44444444444444444444444444444444/content?download=1",
"source_job_id":null,
"source_output_index":null,
"origin":"upload"
}5.2 查询与文件内容
| 接口 | 成功响应 |
|---|---|
GET /assets | 分页 items,total,page,page_size,cursor;可按 kind,q,tag,favorite,origin,folder_id 筛选 |
GET /assets/{asset_id} | 单个 AssetDTO |
GET /assets/{asset_id}/content | 受鉴权保护的原始文件内容 |
GET /assets/{asset_id}/content?download=1 | 以下载方式返回原文件 |
GET /assets/{asset_id}/thumbnail | 已生成的缩略图 |
PATCH /assets/{asset_id} | 修改 name、tags、favorite、folder_ids |
DELETE /assets/{asset_id} | HTTP 204;仍被草稿、任务或运行引用时可能 409 |
下载需要同一用户会话或 assets:read。相对 download_url 已包含 /api,拼接时使用网站根地址,避免得到 /api/api/...。文件接口支持单个字节范围 Range: bytes=0-31,合法请求 HTTP 206,越界为 416;不支持多区间请求。
素材不存在、已删除或非本人均不能访问,通常返回 404。不要把素材路由替换为绕过鉴权的公共静态目录。任务可能有多个成果,应按 kind、mime_type、名称和输出用途选择,不要无条件下载 result_assets[0]。
AssetDTO 和 result_assets 不公开 sha256。普通任务下载可核对 size_bytes 并自行计算文件摘要,但没有公开的可信预期摘要时,不能声称已与服务器 SHA 校验一致。故事成片可按 steps[kind=video.compose].result.asset_id 匹配素材,并与该 Step 返回的 result.sha256 比对;不要臆造 asset.sha256 字段。
6 图片生成接口
6.1 文生图 image.generate
方法:POST /jobs。模型意图:Qwen-Image;以能力接口实际模型标识为准。count 支持 1–4。
| input 字段 | 类型 | 必填 | 默认值 | 限制 |
|---|---|---|---|---|
prompt | string | 是 | 无 | 非空,最多 8000 字符 |
negative_prompt | string | 否 | "" | 最多 8000 字符 |
| parameters 字段 | 类型 | 必填 | 默认值 | 范围 |
|---|---|---|---|---|
width | integer | 否 | 1024 | 256–2048,16 的整数倍 |
height | integer | 否 | 1024 | 256–2048,16 的整数倍 |
num_inference_steps | integer | 否 | 50 | 1–100 |
guidance_scale | number | 否 | 4.0 | 1–20 |
seed | integer | 否 | 42 | 0–4294967295 |
总像素不超过 2048×2048。返回方式与通用 JobDTO 一致;成功时在 result_assets 取得图片。提高步数会增加计算,不是质量保证。
6.2 参考图生成 image.reference.generate
方法:POST /jobs。先上传 1–3 张参考图,保持顺序;本版默认 profile 为 qwen-image-edit-2511-v1,以当前配置与认证为准。缺参考图或未认证时不会自动降级文生图。
| input 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
prompt | string | 是 | 非空,最多 8000 字符;用 Picture 1、Picture 2 对应顺序 |
reference_asset_ids | string[] | 是 | 默认 1–3 张本人图片 ID,不重复;实际最大值由能力给出 |
negative_prompt | string | 否 | 默认空串 |
| parameters 字段 | 类型 | 默认值 | 约束 |
|---|---|---|---|
profile | string | 配置值 | 必须等于已启用且认证的 profile |
width、height | integer | 1280、704 | 仅 1280×704、704×1280、1024×1024 |
num_inference_steps | integer | 40 | 1–100 |
seed | integer | 42 | 0–4294967295 |
guidance_scale | number | 1.0 | 1–20 |
true_cfg_scale | number | 4.0 | 1–20 |
max_sequence_length | integer | 1024 | 1–1024 |
{
"task_type":"image.reference.generate",
"execution_mode":"batch",
"input":{"prompt":"保持Picture 1人物的脸部、发型与服饰,人物站在温暖室内,中景,正面偏侧,表情自然。","reference_asset_ids":["44444444444444444444444444444444"]},
"parameters":{"profile":"qwen-image-edit-2511-v1","width":1280,"height":704,"num_inference_steps":40,"seed":42,"guidance_scale":1.0,"true_cfg_scale":4.0,"max_sequence_length":1024},
"count":1
}生成后应检查人物身份、手部、构图和口部清晰度,再作为视频首帧。参考图是模型输入;普通文生图的提示词中写一个素材 ID 不会自动使用该图片。
7 H3 视频生成接口
7.1 先选择正确的 profile
POST /jobs 的 task_type 都是 video.generate,但 profile 决定参数和音轨合同。调用 H3 时必须显式传 profile。为兼容历史请求,省略 profile 保留旧 Wan 参数语义,不能把它理解成“自动选择服务器最新 H3”。
| profile | 条件输入字段 | 请求帧数 | 输出音轨与用途 |
|---|---|---|---|
minimax-h3-fl2va-bf16-v1 | image_asset_id,可选图生条件 | 25–337 且 4n+1 | 静音,历史常规 H3 |
minimax-h3-fl2va-bf16-v2 | first_frame_asset_id,可选尾帧 | 124–345,步长 17 | 静音完整原生帧 |
minimax-h3-fl2va-bf16-tp2-v1 | image_asset_id 必填 | 25–145 且 4n+1 | 双卡静音,最长请求约 6 秒 |
minimax-h3-fl2va-native-av-v1 | first_frame_asset_id,可选尾帧 | 124–345,步长 17 | 单卡原生音画;可用性取决于服务认证 |
minimax-h3-fl2va-native-av-tp2-v1 | first_frame_asset_id | 124、141、158 | 双卡原生音画,仅首帧;示例使用 1344×768 横屏 |
wan2.2-ti2v-5b-v1 | image_asset_id 可选 | 5–361 且 4n+1 | 保留历史配置 |
profile 是否真实可用、是否正式认证、是否暂时关闭,必须读取目标项自己的能力字段,不能只根据这个清单提交。此处示例采用 minimax-h3-fl2va-native-av-tp2-v1 横屏 1344×768;单卡及竖屏原生配置不因横屏 TP2 验收而自动开放。双卡需要两张符合资源策略的空闲卡,不是传 gpu_count=2;内存预留也按该 profile 的实际资源策略计算。
7.2 原生有声 H3 参数
方法:POST /jobs;count=1。下面以 minimax-h3-fl2va-native-av-tp2-v1 为例;须同时满足目标项实时 available=true 和 [1344,768] 在该项 canvases 内。
| input 字段 | 类型 | 必填 | 约束 |
|---|---|---|---|
prompt | string | 是 | 最多 8000 字符,写完整画面动作、对白和声景 |
first_frame_asset_id | string | 是 | 本人图片 ID |
last_frame_asset_id | string | 不传 | TP2 不支持;提交此字段会拒绝 |
negative_prompt | string | 否 | H3 只能为空;不要提交非空负提示词 |
| parameters 字段 | 类型 | 默认值 | 约束 |
|---|---|---|---|
profile | string | 调用时显式指定 | 示例使用 minimax-h3-fl2va-native-av-tp2-v1 |
width | integer | 1344 | 示例宽度为 1344,须命中实时 canvases |
height | integer | 768 | 示例画幅高度为 768;必须符合目标 profile 的 canvases |
num_frames | integer | 124 | TP2 只允许 124、141、158 |
fps | integer | 24 | 固定 24 |
num_inference_steps | integer | 50 | 2–100 |
seed | integer | 42 | 0–4294967295 |
conditioning_mode | string | first_frame | TP2 固定 first_frame |
upscale | boolean | false | 原生有声固定 false |
upscale_width、upscale_height | integer | 1920、1080 | 通用兼容字段,偶数,分别 256–3840 与 256–2160;原生不执行增强,通常省略 |
tile_size | integer | 128 | 通用兼容字段,64–256,16 的倍数;原生不执行增强,通常省略 |
原生模式不接收 guidance_scale、不支持任意 fps、不支持用 duration=5 替代帧数。124、141、158 帧约为 5.17、5.88、6.58 秒,台词须留出自然开口和句末闭口余量。更长内容拆成正常切镜的多镜头,再走故事流程成片,不能超过 TP2 单镜 158 帧上限。
{
"task_type":"video.generate",
"execution_mode":"batch",
"count":1,
"input":{
"first_frame_asset_id":"44444444444444444444444444444444",
"prompt":"integrated_multimodal_description: [Shot 1] 一位青年正面略偏侧中景,脸部清晰,固定镜头,人物自然呼吸,轻微点头。青年(S1)用清晰自然的中文说:<d>[Chinese] 你好,欢迎来到我们的故事。</d> 说完自然闭唇,保持轻微表情动作到结尾,不再继续说话。\noverall_soundscape: 安静室内,只有这位青年说话,无其他人声。\nnon_diegetic_music: N/A"
},
"parameters":{
"profile":"minimax-h3-fl2va-native-av-tp2-v1",
"width":1344,"height":768,"num_frames":124,"fps":24,
"num_inference_steps":50,"seed":42,"conditioning_mode":"first_frame","upscale":false
}
}成功时 result_assets 应包含带原声的视频及 32kHz 双声道 PCM WAV;按类型识别并分别保存。result.native_av 会提供实测帧数、样本数、采样率、音画时长差和完整输出策略等元数据,以实际响应为准。官方 40Hz 音频潜变量格点可使 WAV 比视频长或短至多约 12.5ms;不能为了让两个容器时长字符串相等而裁掉句尾。
同一段音画的精确帧数及音频样本数可从 Job.result.native_av 读取。
result.native_av 字段 | 类型与单位 | 说明 |
|---|---|---|
video_frames、fps | integer | 实测完整视频帧数,固定 24fps |
sample_rate、channels | integer | 原始 WAV 为 32000Hz、双声道 |
audio_samples | integer,每声道样本数 | 完整原声音轨样本数 |
start_sample、end_sample | integer | 原始完整区间,起点 0,终点等于 audio_samples |
audio_duration、video_duration | number,秒 | 分别按样本数和帧数计算的时长 |
av_duration_delta | number,秒 | 音频时长减视频时长;这是长度差,不是人物口型延迟 |
output_policy、audio_trimmed | string、boolean | full_native、false,完整保留原生输出 |
audio_format | string | pcm_s16le,独立 WAV 的编码 |
直接 video.generate 返回的是该镜头的原始生成结果,不会自动替调用方执行故事的双路对白内容复核、字幕编译和成片验收。需要自动检查和字幕时,走第 11 章故事原生对白流程;不能把“任务 succeeded”当作已经证明口型完全正确。
7.3 静音 H3 首帧示例
{
"task_type":"video.generate",
"execution_mode":"batch",
"input":{"image_asset_id":"44444444444444444444444444444444","prompt":"人物缓慢转头看向窗外,肩部随呼吸轻微起伏,窗外雨水持续流动,固定镜头。"},
"parameters":{"profile":"minimax-h3-fl2va-bf16-v1","width":1344,"height":768,"num_frames":121,"fps":24,"num_inference_steps":50,"seed":42,"upscale":false},
"count":1
}这个 profile 是静音合同。把“配乐”写进提示词不会改变其输出音轨合同;不要把它与 native-av profile 混用。需要首尾帧静音模式时使用 v2,输入字段改成 first_frame_asset_id / last_frame_asset_id,并传 conditioning_mode=first_last_frame、合法原生帧数。
8 缺陷条件样本接口
8.1 defect.generate
方法:POST /jobs;模型意图为 SDXL 与 Canny ControlNet。先上传本人参考图,输出合成条件样本图片及边缘控制图。它不是缺陷检测器,不返回缺陷真值标签或分割掩膜。
| input 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
prompt | string | 是 | 非空,最多 8000 字符,写材质、缺陷类型、范围和光照 |
image_asset_id | string | 是 | 参考图片 ID |
negative_prompt | string | 否 | 默认空串 |
尺寸、步数、seed 范围与文生图一致;本任务默认 guidance_scale=7.5,另有:
| parameters 字段 | 类型 | 默认值 | 约束 |
|---|---|---|---|
controlnet_conditioning_scale | number | 0.8 | 0–2 |
canny_low | integer | 100 | 0–255,必须小于 canny_high |
canny_high | integer | 200 | 0–255 |
count | integer | 1 | 属于外层请求,最多 4,不放入 parameters |
{
"task_type":"defect.generate",
"execution_mode":"batch",
"input":{"image_asset_id":"44444444444444444444444444444444","prompt":"工业检测照片,保持金属表面主体结构,一处细长不规则划痕,划痕边缘有细微反光,背景和光照自然。","negative_prompt":"文字,水印,卡通,整体结构变形"},
"parameters":{"width":1024,"height":1024,"num_inference_steps":50,"seed":100,"guidance_scale":7.5,"controlnet_conditioning_scale":0.8,"canny_low":100,"canny_high":200},
"count":2
}返回两个独立业务任务,种子按 100、101 使用。每个任务成功后保存其全部相关图片,人工确认缺陷是否存在、位置和强度,再做标注;不能把 Canny 图当成缺陷掩膜。生成样本质量与是否适合训练必须通过真实检测数据验证。
9 推演与素材理解接口
9.1 math.solve
方法:POST /jobs。网页“推演”对应数学推演和解释,不是物理仿真、数字孪生、形式化证明或保证正确的求解器。
| 字段 | 类型 | 必填 | 默认值 | 约束 |
|---|---|---|---|---|
input.prompt | string | 是 | 无 | 非空,最多 8000 字符 |
parameters.max_tokens | integer | 否 | 2048 | 1–4096 |
parameters.enable_thinking | boolean | 否 | false | 仅 JSON 布尔值 |
{
"task_type":"math.solve",
"execution_mode":"batch",
"input":{"prompt":"求解方程 x²-5x+6=0,给出计算过程并代回检验。"},
"parameters":{"max_tokens":2048,"enable_thinking":false},
"count":1
}成功后 GET /jobs/{id} 的 result.text 提供回答,result_assets 保存文本、JSON 等成果。例:{"result":{"text":"……模型实际回答……"}}。模型标识从能力接口读取,不能在任务里任意添加 model_url 或 API Key。
9.2 media.structure
用于先理解图片或视频画面,再把提取后的题目交给 math.solve。它不自动把每个模型回答当作数学事实。
| 字段 | 类型 | 必填 | 默认值 | 约束 |
|---|---|---|---|---|
input.asset_id | string | 是 | 无 | 本人图片或视频 ID |
parameters.frame_count | integer | 否 | 6 | 1–12;视频均匀抽帧数 |
{"task_type":"media.structure","execution_mode":"batch","input":{"asset_id":"44444444444444444444444444444444"},"parameters":{"frame_count":6},"count":1}输出 result.subjects、scene、ocr、tags 和 frames,并归档结构化 JSON;每帧包含 timestamp_seconds、scene、subjects、ocr、tags。这些是模型理解结果。对图片题目,先核对题干、符号、单位是否提取准确,再单独提交文本推演;math.solve 不直接接受图片 ID。
9.3 audio.transcribe
| 字段 | 类型 | 必填 | 默认值 | 约束 |
|---|---|---|---|---|
input.audio_asset_id | string | 是 | 无 | 本人音频或有声视频 ID |
parameters.language | string | 否 | zh | zh,en,ja,ko,de,fr,es,ru,ar,pt,it,auto |
parameters.max_audio_seconds | integer | 否 | 1800 | 1–1800 |
{"task_type":"audio.transcribe","execution_mode":"batch","input":{"audio_asset_id":"55555555555555555555555555555555"},"parameters":{"language":"zh","max_audio_seconds":1800},"count":1}这是通用 Whisper 转写合同,时间可能是约 30 秒块边界,不能将其当作字词口型对齐证据。故事原生对白另用真实 word timestamps 和独立识别共识验收。
10 合成 字幕与背景音乐
10.1 video.compose
方法:POST /jobs,count=1。用于已有视频的按序裁剪、拼接、叠加纯文本字幕及指定一条成片音轨。复杂多层音轨和原生对白保留优先走故事混音,不通过提示词控制音量。
| 字段 | 类型 | 必填 | 默认值 | 约束 |
|---|---|---|---|---|
input.asset_ids | string[] | 否 | 无 | 如提供,顺序必须和 clips 一致 |
input.audio_asset_id | string | 否 | 无 | 本人音轨 ID;不要与参数中的音轨 ID 冲突 |
parameters.clips | object[] | 是 | 无 | 1–1000,且服从实时 max_shots 与实际资源上限 |
clips[].asset_id | string | 是 | 无 | 本人视频 ID |
clips[].start_seconds | number | 否 | 0 | 0–86400,源片内起点 |
clips[].end_seconds | number | 否 | 实际结尾 | 大于起点,不能超源片实际长度 |
parameters.width | integer | 否 | 1280 | 256–3840,偶数 |
parameters.height | integer | 否 | 720 | 256–2160,偶数 |
parameters.fps | integer | 否 | 24 | 24、25、30、60 |
parameters.subtitles | object[] | 否 | [] | 最多 1000 条 |
subtitles[].start、end | number | 是 | 无 | 整片秒数,end 大于 start,不能超成片 |
subtitles[].text | string | 是 | 无 | 1–2000 字符纯文本;不支持 ASS 控制语法 |
{
"task_type":"video.compose","execution_mode":"batch","count":1,
"input":{"asset_ids":["66666666666666666666666666666666","77777777777777777777777777777777"],"audio_asset_id":"55555555555555555555555555555555"},
"parameters":{
"width":1920,"height":1080,"fps":24,
"clips":[{"asset_id":"66666666666666666666666666666666","start_seconds":0,"end_seconds":5},{"asset_id":"77777777777777777777777777777777","start_seconds":0,"end_seconds":5}],
"subtitles":[{"start":0.2,"end":4.5,"text":"第一段字幕"},{"start":5.2,"end":9.5,"text":"第二段字幕"}]
}
}外部音轨会作为成片音轨使用,不会自动与各视频对白混合;短音轨剩余补静音,不自动循环,长音轨按成片长度结束。保留原声并叠加背景音乐时,应使用故事 audio.layers 混音,或上传已制作好的整片混合音轨。这里的字幕使用秒数;故事编辑器字幕用帧数,音频图层用 48kHz 整数样本,不要混用。
11 故事、节奏字幕与同框对白
11.1 使用方式
以下路径使用同一用户的登录会话。可从已有故事开始,先按故事操作手册准备好角色、场景、分镜和对白。需要全新故事时按下节接口创建。请求中传最新版本,保存和启动运行使用不同的幂等键。
11.2 创建故事或读取现有故事
POST /stories 返回 HTTP 201 StoryDTO。需要 name 和版本化 spec;create_folder 默认 true,folder_id 可选。已有故事使用 GET /stories/{id}。
以下为新建一个单人说话镜头的最小基准故事示例,ID 仅供说明,实际脚本应使用不同的 uuid.uuid4().hex:
{
"name":"人物说话示例",
"create_folder":false,
"spec":{
"schema_version":3,
"profile":"landscape_1080_v1",
"context":{"style":"写实电影,中景人物,清晰自然面部"},
"scenes":[{"id":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","name":"室内","location":"安静房间","time":"白天","lighting":"柔和窗光"}],
"entities":[{"id":"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","kind":"person","name":"青年","description":"青年男性,短发,浅色衬衫,面部清晰"}],
"shots":[{
"id":"cccccccccccccccccccccccccccccccc","name":"青年开场",
"scene_id":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"cast":[{"id":"dddddddddddddddddddddddddddddddd","entity_id":"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","position":"画面中央中景","action":"自然呼吸并轻微点头"}],
"visual_prompt":"青年正面略偏侧中景,头肩完整,嘴部无遮挡,背景简单,清晰自然面部。",
"motion_prompt":"固定镜头,自然说话,轻微头部与肩部动作,结束后放松闭唇。",
"edit":{"start_frame":0,"duration_frames":120}
}],
"render":{"fps":24,"total_frames":120,"fit":"contain","subtitles":[]}
}
}不要通过修改同一稳定 ID 的含义冒充另一角色;删除镜头、段落或角色后应重新核对引用。
11.3 POST /editors/{draft_id}/dialogue/enable
用途:显式启用或升级为 H3 原生对白。JSON expected_version 必填、integer、至少 1;需要 Idempotency-Key。成功 HTTP 200 EditorDTO。
{"expected_version":1}{
"draft_id":"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"version":2,
"revision":2,
"name":"人物说话示例",
"editing_mode":"auto",
"manifest":{"schema_version":3,"source_kind":"story","spec":{"schema_version":5,"dialogue":{"generation":"native_av","language":"Chinese"}}},
"assets":[],"issues":[]
}上例 manifest 为节选,保存时必须使用真实完整 manifest,不能将这个节选回传。此处以 V5 / V3 草稿说明字段,新建故事启用对白后可能得到 V6 / V4。请沿用响应中的实际版本;稳定镜头、素材和历史运行保留。读取旧故事不会静默升级,旧冻结运行保持原图。
11.4 原生作者字段
| manifest 路径 | 类型 | 说明和限制 |
|---|---|---|
spec.dialogue.generation | string | native_av |
spec.dialogue.language | string | 当前故事本版允许中文 Chinese;实时认证仍必须通过 |
spec.dialogue.speakers[] | object[] | 角色 ID、entity_id、name、native_voice;人物应在故事 entities 中 |
speakers[].native_voice | string 或 null | 1–500 字符声线描述,例如“青年男性,清亮中音,语气平静” |
spec.dialogue.utterances[] | object[] | 稳定 id、speaker_id、完整 text;text 为 1–2000 字符 |
utterances[].spoken_text | string 或 null | 可选口播改写,识别按此实际口播目标检查 |
utterances[].source | string | 文本台词沿用 tts 标签;native_av 下由 H3 直接生成,不创建 TTS 步骤 |
utterances[].delivery | string | 最多 500 字符,语气和表演提示,不是精确采样控制 |
spec.dialogue.sequences[] | object[] | 段落稳定 id、shot_ids、utterance_ids,明确镜头与台词归属 |
shots[].performance.native_utterance_ids | string[] | 本镜头完整台词 ID;[] 明确无对白;多镜头段落必须逐镜分配 |
shots[].performance.visible_speaker_ids | string[] | 画内人物须属于镜头 cast。单人模式选择一人;正式双人轮流模式的两个角色与认证条件见 11.12 |
shots[].performance.lip_sync | string | auto、required、off;画外词时不要求画面人物开口 |
shots[].video_parameters.profile | string | 示例使用横屏 TP2 profile;实际可选组合由实时能力决定 |
shots[].video_parameters.source_frames | integer | 故事字段使用 source_frames;不要与 Jobs 的 num_frames 混淆 |
shots[].video_parameters.upscale | boolean | 原生固定 false |
audio.layers[] | object[] | 独立 BGM/SFX 图层,见下一节 |
captions.mode | string | 常用 script;实际字幕依据验收后的原音词时间生成 |
每句台词必须且只能分配到一个镜头;单人模式通过正常切镜实现多人对白。使用同框轮流发言时要检查独立能力,按顺序分配两位角色的台词。单镜段落可自动采用全部台词,多镜段落不能猜测分配、重复播放或截断一句。
声线描述不能保证克隆参考录音或跨镜音色完全一致。旧参考录音、录音台词和人工导入视频不能冒充已验收的原生音画;需用户明确解除、转换或强制重新生成。原素材和历史绑定不会因此被删除。请分别检查同框轮流、连续动作和尾帧的计划约束;单镜支持某种输入不等于故事编排已经开放该组合。
11.5 POST /editors/{draft_id}/save
用途:保存完整作者 manifest 与可选故事名。成功 HTTP 200 EditorDTO。
| JSON 字段 | 类型 | 必填 | 约束 |
|---|---|---|---|
expected_version | integer | 是 | 最近取得的版本,至少 1 |
manifest | object | 是 | 完整 V1/V2/V3/V4 编辑器 manifest,与故事版本相符 |
name | string 或 null | 否 | 1–255 字符,不允许全空格 |
原生模式不创建独立旁白或 MuseTalk 步骤。旧旁白应明确关闭或转换为画外台词,背景乐留在独立图层。服务器维护的 native_audio、native_report、native_alignment 等派生绑定是只读结果,客户端不得捏造审批、SHA 或质检通过记录。
保存时可在 Postman 把 GET /editors/{draft_id} 返回的完整 manifest 复制到 Body 中,加上当前 expected_version。即使只改故事名,请保留现有镜头、台词、绑定、字幕、音轨和 schema_version。服务端返回最新 EditorDTO 后再进行 plan。
11.6 配乐与字幕字段
故事音频以 48,000Hz 整数样本处理,24fps 下每帧为 2,000 样本。以下为整片开头进入、播放前 5 秒的 BGM 图层节选;素材必须真的有足够长度。
{
"audio":{
"mode":"silent","mix_mode":"composed","segments":[],"ducking":true,
"layers":[{
"id":"ffffffffffffffffffffffffffffffff","role":"bgm","anchor":"absolute",
"asset_id":"55555555555555555555555555555555",
"offset_sample":0,"source_start_sample":0,"source_end_sample":240000,
"gain_db":-16,"fade_in_samples":12000,"fade_out_samples":24000
}]
},
"captions":{"mode":"script","cues":[]}
}这里 audio.mode=silent 只关闭独立旧旁白,原生镜头声音仍由原生混音流程保留。每层 role 为 bgm 或 sfx,默认 bgm;gain_db 范围 -60…12。anchor 可为 absolute、shot、scene,选后两者必须分别提供对应 ID。每层起止、偏移和淡入淡出为整数样本;音乐短了不会被提示词自动延长。
字幕 cue 使用稳定 ID、anchor、start_frame/end_frame、text 和独立的 text_override、timing_override;对白字幕 anchor 为 utterance 并引用 utterance_id。保护人工文案不等于保护人工时间,改时间后仍须落在有效时间线内。只改字幕或配乐可复用有效 H3 视频,改台词、声线、画面或语言会失效对应音视频闭包。
11.7 POST /editors/{draft_id}/plan
先计划再执行。此接口需要会话及 CSRF,但不需要 Idempotency-Key;成功 HTTP 200,不启动模型生成。
| JSON 字段 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
expected_version | integer | 是 | 无 | 草稿当前版本 |
output_goal | string | 否 | film | film 生成成片;media 仅生成目标素材 |
targets | string[] | 否 | [] | 原生支持 frame:id、video:id、native_alignment:id、captions |
force | string[] | 否 | [] | 明确强制更新的目标,不为普通重连设置 |
execution_mode | string | 否 | interactive | 两种队列仍遵守生产时段 |
output_folder_id | string 或 null | 否 | 未指定 | 成果分类 |
{"expected_version":3,"output_goal":"film","targets":[],"force":[],"execution_mode":"batch"}{
"output_goal":"film","source_version":3,
"steps":[
{"key":"frame_0001","kind":"image.generate","unit_id":"cccccccccccccccccccccccccccccccc","status":"generate"},
{"key":"nv_0001","kind":"video.generate","unit_id":"cccccccccccccccccccccccccccccccc","status":"generate"},
{"key":"na_0001","kind":"audio.dialogue.extract","unit_id":"cccccccccccccccccccccccccccccccc","status":"generate"},
{"key":"nq_0001","kind":"audio.dialogue.inspect","unit_id":"cccccccccccccccccccccccccccccccc","status":"generate"}
],
"issues":[],
"plan_hash":"<服务器返回的64位十六进制摘要>"
}这里只节选步骤,实际还有视觉检查、内部验收、混音、字幕和合成。步骤 status 为 generate 或 reuse,不是 Job 的执行状态。issues 非空时先修复问题,不能绕过计划。原生能力缺失会明确阻止生成;首帧单独闭包不要求语音能力。
11.8 POST /editors/{draft_id}/runs
需要会话、CSRF 和 Idempotency-Key;请求与 plan 一致,再增加必填的 64hex expected_plan_hash。成功 HTTP 202 RunSnapshot。
{
"expected_version":3,"output_goal":"film","targets":[],"force":[],
"execution_mode":"batch","expected_plan_hash":"<上一计划的plan_hash>"
}{
"run":{"id":"99999999999999999999999999999999","state":"queued","desired_state":"run","execution_mode":"batch","version":1,"run_kind":"story_auto","output_goal":"film","apply_state":"pending","completed_steps":0,"total_steps":9,"result_assets":[]},
"steps":[],"jobs":[],"cursor":100
}实际 DTO 包含 draft 和按冻结顺序的 Steps。不要假定总步骤恒为 9,首帧复用、多镜头和配乐会改变数量。再次运行前须重新读取 editor 版本并计划;若在计划后改了草稿或能力证据变化,旧摘要会冲突,须重新计划,不能手写哈希。
11.9 查询 取消与应用
GET /workflow-runs/{id} 返回 RunSnapshot,重点查看 run.state、run.error、run.apply_state、Steps 及 run.result_assets。自动运行可从 steps 中找到 kind=video.compose 的 Step,再按其 result.asset_id 匹配输出素材;也可查看对应合成 Job 的 result_assets。不要把任意首帧图片当成片,也不要假定存在未定义的 run.current_output 响应字段。
有对白的原生镜头在首帧后由 H3 一次产生画面、声音和口型,再提取真实音轨、Whisper 逐词识别、SenseVoice 盲内容复核和视觉检查。两路内容与目标台词不一致、缺证据或词时间不可靠时阻止通过,不用作者文字填充“识别结果”。新图没有独立 TTS/MuseTalk;历史冻结图仍可按原合同读取恢复。
无对白镜头使用独立静默验收:固定版本的 Silero CPU VAD 对同一真实音轨的左右声道分别逐窗检查,覆盖完整选段,且 SenseVoice 实际识别为空,才可按 silero-sensevoice-verified-silence-v1 判定无语音。Whisper 在静默或音乐中可能幻觉出文字;报告仍保留原转写、内容错误率和逐词失败,不改写成空、不伪造词时间,也不声称“两路 ASR 都为空”。VAD 或第二路证据缺失、任一声道出现语音、选段或音轨 SHA 不符,仍阻止通过。该静默策略只用于期望台词确实为空的镜头,不能为有对白的错误转写兜底。
| 接口 | JSON | 成功 |
|---|---|---|
POST /workflow-runs/{id}/cancel | {"expected_version":运行version} | 200 RunSnapshot,等待实际退出清理 |
POST /workflow-runs/{id}/pause | 同上 | 200,暂停后续阶段 |
POST /workflow-runs/{id}/resume | 同上 | 200,仍受能力、窗口及清理状态控制 |
POST /editors/{draft_id}/apply | {"expected_version":草稿version,"run_id":"..."} | 200 EditorDTO;成功且来源版本匹配才应用 |
这些运行控制应保存相应 Idempotency-Key。V5 成片成功后会尝试自动应用;apply_state=conflict 表示作者已有更新,结果保留但不覆盖。先查看新编辑内容与输出,再明确处理,不强行把旧结果覆盖回新草稿。
11.10 修改后局部重生成
| 想修改什么 | 操作 |
|---|---|
| 某镜头画面或台词 | 修改该镜头/对应台词并 save,再 plan + run;需要强制时用 video:<shot_id> |
| 发音、声线、表演 | 修改角色 native_voice、台词或 delivery;该镜头画面与声音一起重新生成 |
| 仅字幕文案/位置 | 改 cue 并 save,film 计划可复用 H3;人工保护仍检查合法性 |
| 只重测字幕时间 | force native_alignment:<shot_id>,重新识别与验收,不重生成 H3 |
| 背景音乐、音量、淡入淡出 | 修改 audio.layers 后生成 film,只重混音和合成 |
| 只更新首帧 | media 目标 frame:<shot_id>;不会自动修改全片作者时长 |
示例:只重新生成一个镜头素材时,output_goal=media、targets=["video:<shot_id>"]、force=["video:<shot_id>"];之后再计划 film 复用有效素材生成新成片。不要用旧 speech:、base_video:、synced_video: 目标调用新原生图。
11.11 人工路径兼容
人工逐步制作仍使用 /stories/{id}/candidates、/selections、/readiness、/renders。自动成片不用逐镜候选确认;两条路径不能混淆批准状态。模式切换使用 POST /editors/{id}/mode,JSON 为 {"expected_version":版本,"mode":"auto"或"manual"},需要会话、CSRF、幂等键和空闲草稿。
删除故事前先确认连带范围。DELETE /stories/{id} 携带 If-Match 版本。服务隐藏故事并清理其运行、任务和可删除的未收藏素材,保留已收藏或仍有受保护引用的素材。未收尾时返回 202 及 pending=true,协调器继续处理;处理完成时返回清理回执。
11.12 当前版本的成片与对白修订接口
| 方法和路径 | 参数位置、类型与要求 | 成功响应 |
|---|---|---|
| GET /stories/{id}/film | path:故事 ID,string,必填。读取当前用户的故事 | 200,最新正式成片对象含 asset(AssetDTO)、draft_revision(integer)、run_id(string)、captions_srt_available(boolean);没有符合条件的正式运行时返回 null。实验视频也可在素材库按 ID 下载 |
| POST /editors/{draft_id}/captions/preview | JSON:expected_version 必填 integer;utterance_id 可选 string;manifest 可选完整对象,用于预览编辑 | 200,version、fps 为 integer,rows、issues 为数组。行中有 text、local_start_frame、local_end_frame;没有可靠时序时允许待定 |
| GET /editors/{draft_id}/runs/{run_id}/captions.srt | path:草稿和运行 ID 均为必填 string;需有冻结字幕 | 200,application/x-subrip,UTF-8 字幕附件。可先查 captions_srt_available |
| POST /editors/{draft_id}/dialogue/fork-cuts | 会话及 CSRF。JSON:expected_version(integer)、shot_id(string)必填;confirm(boolean,默认 false)、name(string)可选。确认时加 Idempotency-Key | 200,预览返回 shots、warnings、name;confirm=true 成功返回新草稿,用于改为说话人切镜 |
| POST /editors/{draft_id}/runs/{run_id}/turns/{shot_id}/review | 会话、CSRF、幂等键。JSON:expected_version(当前运行的 integer 版本)、report_sha256(64位十六进制 string)、decision(accept)、note(1–1000字符)必填 | 200 更新后运行快照,仅适用于服务判定可以人工复核的镜头 |
原生对白故事可使用 Story V6 与 Editor V4。节奏字幕在编辑清单的 captions.presentation 设置 punctuation(hide、preserve)及 pacing(rhythm、sentence),配套提交 edits 数组;当前新功能可按实际语音停顿显示无标点字幕,历史清单仍按保存的版本解析。导出 SRT 使用相应运行的冻结字幕。
只改字幕、配乐时,可在相同 plan/runs 合同中分别选择 output_goal=caption_film、mix_film,用合格已有来源生成修订。caption_inspect 用于补充字幕检查。根据返回的 issues 处理来源、人工锁定及能力限制,再按 plan_hash 提交。
新故事可在 POST /stories 的 JSON 中选择 captions_mode(none、manual、script、ai_script)和 caption_presentation(punctuation、pacing)。既有故事不会自动套用新建时的偏好。
正式同框轮流发言需要 GET /capabilities 中的 dialogue.native_av.two_person_turns.available。草稿可以配置、自由提示词可以试拍,正式运行仍会检查模型证据与逐轮验收。被判定需要重生成时,先修正台词、画面或绑定素材。对于可复核项,使用当前运行报告的摘要提交判断。
12 定时提交 批次与事件流
12.1 定时任务
POST /jobs 可在外层增加 scheduled_at:
{"task_type":"image.generate","execution_mode":"batch","scheduled_at":"2027-01-01T21:00:00+08:00","input":{"prompt":"清晨山谷,云雾缓慢散开"},"parameters":{"width":1024,"height":1024,"seed":42},"count":1}定时只是最早派发时刻,不是保证开始时刻。届时仍需窗口开放、资源可用、用户有效和能力就绪。
12.2 POST /batches
鉴权:会话及 CSRF,或 batches:write。需要 Idempotency-Key,成功 HTTP 202。
| 字段 | 类型 | 必填 | 默认值 | 限制 |
|---|---|---|---|---|
name | string | 否 | 夜间批次 | 1–255 字符 |
items | object[] | 是 | 无 | 1–100 个清单项 |
items[].kind | string | 是 | 无 | job 或 workflow |
| job 项 task_type/input/parameters/count | 同 Jobs | 按任务 | count=1 | 同任务参数合同 |
| workflow 项 draft_id/draft_revision/expected_version | string/integer/integer | 是 | 无 | 冻结指定工作流修订 |
{
"name":"夜间素材批次",
"items":[
{"kind":"job","task_type":"image.generate","input":{"prompt":"写实雨夜街口"},"parameters":{"width":1024,"height":1024,"seed":42},"count":1},
{"kind":"job","task_type":"math.solve","input":{"prompt":"计算2x+3=9并检验"},"parameters":{"max_tokens":1024,"enable_thinking":false},"count":1}
]
}返回 BatchSnapshot,包含批次及成员状态。GET /batches/{id} 查询;POST /batches/{id}/control 传 {"desired_state":"run|pause|cancel","expected_version":当前版本},实际传其中一个枚举值。100 个清单项不等于并行使用 100 张 GPU,也不能把单任务 count 改为 100。
12.3 GET /events
鉴权:会话或 events:read。返回 Content-Type: text/event-stream,长连接,不是一次性 JSON。
| 参数/头 | 类型 | 默认值 | 说明 |
|---|---|---|---|
query after | integer | 0 | 非负 owner 事件游标 |
Last-Event-ID | integer 字符串 | 无 | 提供时优先于 query after |
: connected
id: 123
event: job.updated
data: {"job":{"id":"33333333333333333333333333333333","state":"running","version":2}}
: heartbeat实际 data 结构按事件而定;收到通知后可重新 GET 对应资源。断流保存游标重新订阅,遇 reset 必须重新获取当前列表和详情;不重建生成请求。反代需保留 SSE 不缓冲及长超时。令牌不放在 URL 中,也不把 Session Cookie 写进事件日志。
13 错误码与排查
业务错误通常返回 detail.code 和 detail.message。请求模型校验失败时,HTTP 422 的 detail 也可能是含 loc、msg、type 的数组。
业务错误通常形如:
{"detail":{"code":"capability_unavailable","message":"所选模型尚未启用或尚未完成认证"}}Pydantic 字段验证错误可能返回 detail 数组,含 loc/type/msg。客户端应兼容这两种形状,不要只支持一个中文 message。
| HTTP | code 示例 | 处理 |
|---|---|---|
| 400 | invalid_input | 参数不符合该任务合同,核对字段、类型、帧数与 profile |
| 401 | not_authenticated、session_expired、token_expired | 重新登录或检查令牌有效期/用户禁用情况 |
| 403 | csrf_failed | 会话写操作补正确 CSRF,不关闭校验 |
| 403 | scope_required | 配置实际存在且适用的 scope |
| 403 | session_required | 改用登录会话;不能给 token 加不存在权限绕过 |
| 404 | asset_not_found、resource_not_found | 检查 ID、归属、删除状态;管理员也不能跨私有资源读取 |
| 409 | idempotency_conflict | 同键参数变了;恢复用原参数,新意图才用新键 |
| 409 | draft_version_conflict、run_version_conflict | 重新读取版本,保留用户修改后重新计划 |
| 409 | cleanup_pending、deletion_requires_terminal | 独立记录需等待相关执行清理;删除整个故事使用第 11.11 节的联动清理回执 |
| 409 | native_dialogue_upgrade_required | 显式升级旧对白草稿,新运行不创建旧口型图 |
| 409 | invalid_native_alignment | 实测原声、双路文字、词时间或来源合同不匹配,不能伪造通过 |
| 409 | locked_dependency_changed | 依赖已变但素材锁定;明确解锁或强制重生成 |
| 410 | resource_purged | 原幂等结果已删除,不能复活旧意图 |
| 413 | 上传/输出超限 | 减小文件或按资源策略拆分 |
| 416 | 非法 Range | 修正字节区间,避免多范围请求 |
| 422 | unsupported_task、invalid_target 等 | 核对任务类型、字段、目标语法与素材种类 |
| 422 | native_canvas_uncertified | 原生 width/height 未命中该 profile 的实时 canvases;示例使用 1344×768 横屏 |
| 429 | quota_exceeded、频率限制 | 有界退避,减少并发或等待配额释放 |
| 503 | capability_unavailable、maintenance | 等待恢复或完成模型认证;不要换成未经授权的服务 |
| 503 | database_unavailable | 管理员查看真实 SQL/锁/连接原因;不要连续重发删除 |
/capabilities 或计划中返回的 reason/issues 比“服务器在线”更具体。原生模式典型计划问题包括台词遗漏/重复、超过单镜容量、录音不支持、双人同框未认证、人工视频不支持、画面或声音证据缺失。先解决对应问题再执行,不关闭门禁。
同一次网络超时不能直接视为未受理。先恢复幂等提交或查询已知 ID;上游执行结果未知时不要发另一个任务占用更多资源。
下载与维护
OpenAPI JSON · 故事操作手册。在项目根目录使用业务后端 Python 环境运行 python scripts/export_api_openapi.py 导出完整接口定义,运行 python scripts/render_manuals.py --only api 发布网页与 Markdown。路径覆盖全部 HTTP 操作;部分路由由服务层直接返回动态 DTO,其成功响应没有额外声明 Pydantic 类型,请结合本文的返回字段和实际响应读取。
接口索引(94 项)
点击方法与路径查看 OpenAPI 声明。会话、CSRF、手动读取的请求头和动态响应见上文。媒体下载、SSE、SRT 的实际响应类型也以上文说明为准。
POST /api/editors/{draft_id}/dialogue/fork-cuts
- path ·
draft_id· string · 必填 - header ·
idempotency-key· string / null · 可选 - body · application/json · ForkSpeakerCuts
- HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/editors/{draft_id}/runs/{run_id}/turns/{shot_id}/review
- path ·
draft_id· string · 必填 - path ·
run_id· string · 必填 - path ·
shot_id· string · 必填 - header ·
idempotency-key· string / null · 可选 - body · application/json · ReviewTurns
- HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/editors/{draft_id}/captions/preview
- path ·
draft_id· string · 必填 - body · application/json · PreviewCaptions
- HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/editors/{draft_id}/runs/{run_id}/captions.srt
- path ·
draft_id· string · 必填 - path ·
run_id· string · 必填 - HTTP 200 · text/plain · string
- HTTP 422 · application/json · HTTPValidationError
POST /api/editors/{draft_id}/dialogue/fork-prepared
- path ·
draft_id· string · 必填 - header ·
idempotency-key· string / null · 可选 - body · application/json · ForkPrepared
- HTTP 201 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/editors/{draft_id}/dialogue/enable
- path ·
draft_id· string · 必填 - header ·
idempotency-key· string / null · 可选 - body · application/json · EnableDialogue
- HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/editors/{draft_id}
- path ·
draft_id· string · 必填 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/editors/{draft_id}/save
- path ·
draft_id· string · 必填 - header ·
idempotency-key· string / null · 可选 - body · application/json · SaveEditor
- HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/editors/{draft_id}/from-run
- path ·
draft_id· string · 必填 - header ·
idempotency-key· string / null · 可选 - body · application/json · RestoreEditor
- HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/editors/{draft_id}/plan
- path ·
draft_id· string · 必填 - body · application/json · PlanEditor
- HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/editors/{draft_id}/runs
- path ·
draft_id· string · 必填 - header ·
idempotency-key· string / null · 可选 - body · application/json · StartEditor
- HTTP 202 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/editors/{draft_id}/apply
- path ·
draft_id· string · 必填 - header ·
idempotency-key· string / null · 可选 - body · application/json · RestoreEditor
- HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/editors/{draft_id}/mode
- path ·
draft_id· string · 必填 - header ·
idempotency-key· string / null · 可选 - body · application/json · EditorMode
- HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/folders
- HTTP 200 · application/json · 未声明固定结构
POST /api/folders
- body · application/json · FolderCreate
- HTTP 201 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/folders/assign
- body · application/json · FolderAssign
- HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
PATCH /api/folders/{folder_id}
- path ·
folder_id· string · 必填 - body · application/json · FolderPatch
- HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
DELETE /api/folders/{folder_id}
- path ·
folder_id· string · 必填 - HTTP 204 · Successful Response
- HTTP 422 · application/json · HTTPValidationError
POST /api/auth/login
- body · application/json · Login
- HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/auth/me
- HTTP 200 · application/json · 未声明固定结构
POST /api/auth/logout
- HTTP 204 · Successful Response
POST /api/auth/users
- body · application/json · CreateUser
- HTTP 201 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/auth/users
- query ·
page· integer · 可选 - query ·
page_size· integer · 可选 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
PATCH /api/auth/users/{user_id}
- path ·
user_id· string · 必填 - body · application/json · UserPatch
- HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
DELETE /api/auth/users/{user_id}
- path ·
user_id· string · 必填 - HTTP 204 · Successful Response
- HTTP 422 · application/json · HTTPValidationError
POST /api/auth/password
- body · application/json · PasswordChange
- HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/auth/username
- body · application/json · UsernameChange
- HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/assets
- body · multipart/form-data · Body_upload_api_assets_post
- HTTP 201 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/assets
- query ·
page· integer · 可选 - query ·
page_size· integer · 可选 - query ·
folder_id· string · 可选 - query ·
kind· string · 可选 - query ·
q· string · 可选 - query ·
tag· string · 可选 - query ·
favorite· boolean / null · 可选 - query ·
origin· string · 可选 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/assets/{asset_id}
- path ·
asset_id· string · 必填 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
PATCH /api/assets/{asset_id}
- path ·
asset_id· string · 必填 - body · application/json · AssetPatch
- HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
DELETE /api/assets/{asset_id}
- path ·
asset_id· string · 必填 - HTTP 204 · Successful Response
- HTTP 422 · application/json · HTTPValidationError
GET /api/assets/{asset_id}/content
- path ·
asset_id· string · 必填 - query ·
download· boolean · 可选 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/assets/{asset_id}/thumbnail
- path ·
asset_id· string · 必填 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/shared-assets
- query ·
q· string · 可选 - query ·
kind· string · 可选 - query ·
tag· string · 可选 - query ·
mine· boolean · 可选 - query ·
page· integer · 可选 - query ·
page_size· integer · 可选 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/shared-assets/{shared_id}
- path ·
shared_id· string · 必填 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
DELETE /api/shared-assets/{shared_id}
- path ·
shared_id· string · 必填 - HTTP 204 · Successful Response
- HTTP 422 · application/json · HTTPValidationError
GET /api/shared-assets/{shared_id}/content
- path ·
shared_id· string · 必填 - query ·
download· boolean · 可选 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/shared-assets/{shared_id}/thumbnail
- path ·
shared_id· string · 必填 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/shared-assets/{shared_id}/import
- path ·
shared_id· string · 必填 - header ·
idempotency-key· string / null · 可选 - body · application/json · SharedImport / null
- HTTP 201 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/assets/{asset_id}/publish
- path ·
asset_id· string · 必填 - header ·
idempotency-key· string / null · 可选 - body · application/json · EmptyPayload / null
- HTTP 201 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/jobs
- header ·
idempotency-key· string / null · 可选 - body · application/json · Submit
- HTTP 202 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/jobs
- query ·
page· integer · 可选 - query ·
page_size· integer · 可选 - query ·
folder_id· string · 可选 - query ·
task_type· string · 可选 - query ·
state· string · 可选 - query ·
root_only· boolean · 可选 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/jobs/{job_id}
- path ·
job_id· string · 必填 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
DELETE /api/jobs/{job_id}
- path ·
job_id· string · 必填 - header ·
if-match· string / null · 可选 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/jobs/{job_id}/cancel
- path ·
job_id· string · 必填 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/jobs/{job_id}/retry
- path ·
job_id· string · 必填 - header ·
idempotency-key· string / null · 可选 - HTTP 202 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/events
- query ·
after· integer · 可选 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/submissions/{key}
- path ·
key· string · 必填 - query ·
operation· string · 必填 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/auth/tokens
- HTTP 200 · application/json · 未声明固定结构
POST /api/auth/tokens
- body · application/json · TokenInput
- HTTP 201 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
DELETE /api/auth/tokens/{token_id}
- path ·
token_id· string · 必填 - HTTP 204 · Successful Response
- HTTP 422 · application/json · HTTPValidationError
POST /api/workflows
- body · application/json · DraftCreate
- HTTP 201 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/workflows
- query ·
page· integer · 可选 - query ·
page_size· integer · 可选 - query ·
folder_id· string · 可选 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/workflows/{id}
- path ·
id· string · 必填 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
DELETE /api/workflows/{id}
- path ·
id· string · 必填 - header ·
if-match· string / null · 可选 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
PATCH /api/workflows/{id}
- path ·
id· string · 必填 - header ·
if-match· string / null · 可选 - body · application/json · DraftPatch
- HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/workflows/{id}/runs
- path ·
id· string · 必填 - header ·
idempotency-key· string / null · 可选 - body · application/json · RunCreate
- HTTP 202 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/workflow-runs
- query ·
page· integer · 可选 - query ·
page_size· integer · 可选 - query ·
folder_id· string · 可选 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/workflow-runs/{id}
- path ·
id· string · 必填 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
DELETE /api/workflow-runs/{id}
- path ·
id· string · 必填 - header ·
if-match· string / null · 可选 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/workflow-runs/{id}/steps/{key}/retry
- path ·
id· string · 必填 - path ·
key· string · 必填 - header ·
idempotency-key· string / null · 可选 - body · application/json · Retry
- HTTP 202 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/workflow-runs/{id}/steps/{key}/restore-manual-frame
- path ·
id· string · 必填 - path ·
key· string · 必填 - header ·
idempotency-key· string / null · 可选 - body · application/json · RestoreManualFrame
- HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/workflow-runs/{id}/cancel
- path ·
id· string · 必填 - header ·
idempotency-key· string / null · 可选 - body · application/json · Control
- HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/workflow-runs/{id}/pause
- path ·
id· string · 必填 - header ·
idempotency-key· string / null · 可选 - body · application/json · Control
- HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/workflow-runs/{id}/resume
- path ·
id· string · 必填 - header ·
idempotency-key· string / null · 可选 - body · application/json · Control
- HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/batches
- header ·
idempotency-key· string / null · 可选 - body · application/json · BatchCreate
- HTTP 202 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/batches
- query ·
page· integer · 可选 - query ·
page_size· integer · 可选 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/batches/{id}
- path ·
id· string · 必填 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
DELETE /api/batches/{id}
- path ·
id· string · 必填 - header ·
if-match· string / null · 可选 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/batches/{id}/control
- path ·
id· string · 必填 - header ·
idempotency-key· string / null · 可选 - body · application/json · BatchControl
- HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/health
- HTTP 200 · application/json · 未声明固定结构
GET /api/live
- HTTP 200 · application/json · 未声明固定结构
GET /api/ready
- HTTP 200 · application/json · 未声明固定结构
GET /api/capabilities
- HTTP 200 · application/json · 未声明固定结构
GET /api/system/status
- HTTP 200 · application/json · 未声明固定结构
GET /api/stories/capabilities
- HTTP 200 · application/json · 未声明固定结构
GET /api/stories
- query ·
page· integer · 可选 - query ·
page_size· integer · 可选 - query ·
folder_id· string · 可选 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/stories
- body · application/json · StoryCreate
- HTTP 201 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/stories/{id}
- path ·
id· string · 必填 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
PATCH /api/stories/{id}
- path ·
id· string · 必填 - header ·
if-match· string / null · 可选 - body · application/json · StoryPatch
- HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
DELETE /api/stories/{id}
- path ·
id· string · 必填 - header ·
if-match· string / null · 可选 - HTTP 200 · application/json · 未声明固定结构
- HTTP 202 · 故事已隐藏,正在等待执行清理
- HTTP 422 · application/json · HTTPValidationError
GET /api/stories/{id}/film
- path ·
id· string · 必填 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/stories/{id}/preview
- path ·
id· string · 必填 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/stories/{id}/readiness
- path ·
id· string · 必填 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/stories/{id}/candidates
- path ·
id· string · 必填 - query ·
shot_id· string / null · 可选 - query ·
kind· string / null · 可选 - query ·
page· integer · 可选 - query ·
page_size· integer · 可选 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/stories/{id}/candidates
- path ·
id· string · 必填 - header ·
idempotency-key· string / null · 可选 - body · application/json · CandidateCreate
- HTTP 202 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/stories/{id}/candidate-batches
- path ·
id· string · 必填 - header ·
idempotency-key· string / null · 可选 - body · application/json · CandidateBatch
- HTTP 202 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/stories/{id}/candidates/{candidate_id}/retry
- path ·
id· string · 必填 - path ·
candidate_id· string · 必填 - header ·
idempotency-key· string / null · 可选 - body · application/json · Version
- HTTP 202 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
DELETE /api/stories/{id}/candidates/{candidate_id}
- path ·
id· string · 必填 - path ·
candidate_id· string · 必填 - header ·
if-match· string / null · 可选 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/stories/{id}/selections
- path ·
id· string · 必填 - header ·
idempotency-key· string / null · 可选 - body · application/json · SelectionCreate
- HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/stories/{id}/selections/clear
- path ·
id· string · 必填 - header ·
idempotency-key· string / null · 可选 - body · application/json · SelectionClear
- HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
POST /api/stories/{id}/renders
- path ·
id· string · 必填 - header ·
idempotency-key· string / null · 可选 - body · application/json · RenderCreate
- HTTP 202 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
GET /api/stories/{id}/runs
- path ·
id· string · 必填 - query ·
page· integer · 可选 - query ·
page_size· integer · 可选 - HTTP 200 · application/json · 未声明固定结构
- HTTP 422 · application/json · HTTPValidationError
请求体与字段定义
点击模型名可展开完整定义。required 列出必填字段,properties 描述类型、格式和取值。
AssetPatch
{
"properties": {
"folder_ids": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array",
"maxItems": 200
},
{
"type": "null"
}
],
"title": "Folder Ids"
},
"name": {
"anyOf": [
{
"type": "string",
"maxLength": 255,
"minLength": 1
},
{
"type": "null"
}
],
"title": "Name"
},
"tags": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array",
"maxItems": 30
},
{
"type": "null"
}
],
"title": "Tags"
},
"favorite": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Favorite"
}
},
"type": "object",
"title": "AssetPatch"
}Audio
{
"properties": {
"asset_id": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"title": "Asset Id"
},
"source_start_ms": {
"type": "integer",
"minimum": 0.0,
"title": "Source Start Ms"
},
"source_end_ms": {
"type": "integer",
"exclusiveMinimum": 0.0,
"title": "Source End Ms"
},
"offset_frame": {
"type": "integer",
"minimum": 0.0,
"title": "Offset Frame",
"default": 0
},
"short_policy": {
"type": "string",
"const": "silence",
"title": "Short Policy",
"default": "silence"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"asset_id",
"source_start_ms",
"source_end_ms"
],
"title": "Audio"
}AudioLayerV2
{
"properties": {
"anchor": {
"type": "string",
"enum": [
"shot",
"scene",
"absolute"
],
"title": "Anchor",
"default": "shot"
},
"shot_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Shot Id"
},
"scene_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Scene Id"
},
"offset_sample": {
"type": "integer",
"maximum": 720000000.0,
"minimum": 0.0,
"title": "Offset Sample",
"default": 0
},
"source_start_sample": {
"type": "integer",
"maximum": 720000000.0,
"minimum": 0.0,
"title": "Source Start Sample",
"default": 0
},
"source_end_sample": {
"anyOf": [
{
"type": "integer",
"maximum": 720000000.0,
"exclusiveMinimum": 0.0
},
{
"type": "null"
}
],
"title": "Source End Sample"
},
"gain_db": {
"type": "number",
"maximum": 12.0,
"minimum": -60.0,
"title": "Gain Db",
"default": 0.0
},
"fade_in_samples": {
"type": "integer",
"maximum": 720000000.0,
"minimum": 0.0,
"title": "Fade In Samples",
"default": 0
},
"fade_out_samples": {
"type": "integer",
"maximum": 720000000.0,
"minimum": 0.0,
"title": "Fade Out Samples",
"default": 0
},
"id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"title": "Id"
},
"role": {
"type": "string",
"enum": [
"bgm",
"sfx"
],
"title": "Role",
"default": "bgm"
},
"asset_id": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"title": "Asset Id"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"id",
"asset_id"
],
"title": "AudioLayerV2"
}AudioSegment
{
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"title": "Id"
},
"shot_id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"title": "Shot Id"
},
"text": {
"type": "string",
"maxLength": 2000,
"title": "Text"
},
"voice": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Voice"
},
"speed": {
"anyOf": [
{
"type": "number",
"maximum": 2.0,
"minimum": 0.5
},
{
"type": "null"
}
],
"title": "Speed"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"id",
"shot_id",
"text"
],
"title": "AudioSegment"
}AudioSegmentV2
{
"properties": {
"anchor": {
"type": "string",
"enum": [
"shot",
"scene",
"absolute"
],
"title": "Anchor",
"default": "shot"
},
"shot_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Shot Id"
},
"scene_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Scene Id"
},
"offset_sample": {
"type": "integer",
"maximum": 720000000.0,
"minimum": 0.0,
"title": "Offset Sample",
"default": 0
},
"source_start_sample": {
"type": "integer",
"maximum": 720000000.0,
"minimum": 0.0,
"title": "Source Start Sample",
"default": 0
},
"source_end_sample": {
"anyOf": [
{
"type": "integer",
"maximum": 720000000.0,
"exclusiveMinimum": 0.0
},
{
"type": "null"
}
],
"title": "Source End Sample"
},
"gain_db": {
"type": "number",
"maximum": 12.0,
"minimum": -60.0,
"title": "Gain Db",
"default": 0.0
},
"fade_in_samples": {
"type": "integer",
"maximum": 720000000.0,
"minimum": 0.0,
"title": "Fade In Samples",
"default": 0
},
"fade_out_samples": {
"type": "integer",
"maximum": 720000000.0,
"minimum": 0.0,
"title": "Fade Out Samples",
"default": 0
},
"id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"title": "Id"
},
"text": {
"type": "string",
"maxLength": 2000,
"title": "Text",
"default": ""
},
"voice": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Voice"
},
"speed": {
"anyOf": [
{
"type": "number",
"maximum": 2.0,
"minimum": 0.5
},
{
"type": "null"
}
],
"title": "Speed"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"id"
],
"title": "AudioSegmentV2"
}AudioSelectionV2
{
"properties": {
"asset_id": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"title": "Asset Id"
},
"source_start_sample": {
"type": "integer",
"maximum": 720000000.0,
"minimum": 0.0,
"title": "Source Start Sample",
"default": 0
},
"source_end_sample": {
"type": "integer",
"maximum": 720000000.0,
"exclusiveMinimum": 0.0,
"title": "Source End Sample"
},
"offset_sample": {
"type": "integer",
"maximum": 720000000.0,
"minimum": 0.0,
"title": "Offset Sample",
"default": 0
},
"sample_rate": {
"type": "integer",
"const": 48000,
"title": "Sample Rate",
"default": 48000
},
"short_policy": {
"type": "string",
"const": "silence",
"title": "Short Policy",
"default": "silence"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"asset_id",
"source_end_sample"
],
"title": "AudioSelectionV2"
}BatchControl
{
"properties": {
"desired_state": {
"type": "string",
"enum": [
"run",
"pause",
"cancel"
],
"title": "Desired State"
},
"expected_version": {
"anyOf": [
{
"type": "integer",
"minimum": 1.0
},
{
"type": "null"
}
],
"title": "Expected Version"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"desired_state"
],
"title": "BatchControl"
}BatchCreate
{
"properties": {
"name": {
"type": "string",
"maxLength": 255,
"minLength": 1,
"title": "Name",
"default": "夜间批次"
},
"items": {
"items": {
"anyOf": [
{
"$ref": "#/components/schemas/BatchWorkflow"
},
{
"$ref": "#/components/schemas/BatchJob"
}
]
},
"type": "array",
"maxItems": 100,
"minItems": 1,
"title": "Items"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"items"
],
"title": "BatchCreate"
}BatchJob
{
"properties": {
"folder_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Folder Id"
},
"output_folder_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Output Folder Id"
},
"kind": {
"type": "string",
"const": "job",
"title": "Kind"
},
"task_type": {
"type": "string",
"title": "Task Type"
},
"input": {
"additionalProperties": true,
"type": "object",
"title": "Input"
},
"parameters": {
"additionalProperties": true,
"type": "object",
"title": "Parameters"
},
"count": {
"type": "integer",
"maximum": 4.0,
"minimum": 1.0,
"title": "Count",
"default": 1
}
},
"additionalProperties": false,
"type": "object",
"required": [
"kind",
"task_type"
],
"title": "BatchJob"
}BatchWorkflow
{
"properties": {
"output_folder_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Output Folder Id"
},
"kind": {
"type": "string",
"const": "workflow",
"title": "Kind"
},
"draft_id": {
"type": "string",
"title": "Draft Id"
},
"draft_revision": {
"type": "integer",
"minimum": 1.0,
"title": "Draft Revision"
},
"expected_version": {
"type": "integer",
"minimum": 1.0,
"title": "Expected Version"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"kind",
"draft_id",
"draft_revision",
"expected_version"
],
"title": "BatchWorkflow"
}Binding
{
"properties": {
"asset_id": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"title": "Asset Id"
},
"sha256": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
{
"type": "null"
}
],
"title": "Sha256"
},
"kind": {
"type": "string",
"enum": [
"image",
"video",
"audio",
"text",
"json"
],
"title": "Kind"
},
"input_hash": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Input Hash"
},
"context_hash": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Context Hash"
},
"source": {
"type": "string",
"enum": [
"generated",
"manual",
"reused"
],
"title": "Source"
},
"locked": {
"type": "boolean",
"title": "Locked",
"default": false
},
"source_run_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Source Run Id"
},
"source_job_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Source Job Id"
},
"generation_parameters": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Generation Parameters"
},
"duration_seconds": {
"anyOf": [
{
"type": "number",
"minimum": 0.0
},
{
"type": "null"
}
],
"title": "Duration Seconds"
},
"duration_frames": {
"anyOf": [
{
"type": "integer",
"minimum": 0.0
},
{
"type": "null"
}
],
"title": "Duration Frames"
},
"sample_count": {
"anyOf": [
{
"type": "integer",
"minimum": 0.0
},
{
"type": "null"
}
],
"title": "Sample Count"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"asset_id",
"kind",
"source"
],
"title": "Binding"
}BindingV2
{
"properties": {
"asset_id": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"title": "Asset Id"
},
"sha256": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
{
"type": "null"
}
],
"title": "Sha256"
},
"kind": {
"type": "string",
"enum": [
"image",
"video",
"audio",
"text",
"json"
],
"title": "Kind"
},
"input_hash": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Input Hash"
},
"context_hash": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Context Hash"
},
"source": {
"type": "string",
"enum": [
"generated",
"manual",
"reused"
],
"title": "Source"
},
"locked": {
"type": "boolean",
"title": "Locked",
"default": false
},
"source_run_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Source Run Id"
},
"source_job_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Source Job Id"
},
"generation_parameters": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Generation Parameters"
},
"duration_seconds": {
"anyOf": [
{
"type": "number",
"minimum": 0.0
},
{
"type": "null"
}
],
"title": "Duration Seconds"
},
"duration_frames": {
"anyOf": [
{
"type": "integer",
"minimum": 0.0
},
{
"type": "null"
}
],
"title": "Duration Frames"
},
"sample_count": {
"anyOf": [
{
"type": "integer",
"minimum": 0.0
},
{
"type": "null"
}
],
"title": "Sample Count"
},
"sample_rate": {
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0.0
},
{
"type": "null"
}
],
"title": "Sample Rate"
},
"provenance": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Provenance"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"asset_id",
"kind",
"source"
],
"title": "BindingV2"
}Body_upload_api_assets_post
{
"properties": {
"file": {
"type": "string",
"contentMediaType": "application/octet-stream",
"title": "File"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Name"
},
"folder_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Folder Id"
}
},
"type": "object",
"required": [
"file"
],
"title": "Body_upload_api_assets_post"
}CandidateBatch
{
"properties": {
"expected_version": {
"type": "integer",
"minimum": 1.0,
"title": "Expected Version"
},
"output_folder_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Output Folder Id"
},
"shot_ids": {
"items": {
"type": "string"
},
"type": "array",
"maxItems": 1000,
"minItems": 1,
"title": "Shot Ids"
},
"kind": {
"type": "string",
"enum": [
"frame",
"video",
"end_frame"
],
"title": "Kind"
},
"count": {
"type": "integer",
"maximum": 4.0,
"minimum": 1.0,
"title": "Count",
"default": 1
},
"execution_mode": {
"type": "string",
"enum": [
"interactive",
"batch"
],
"title": "Execution Mode",
"default": "batch"
},
"reference_mode": {
"anyOf": [
{
"type": "string",
"enum": [
"text",
"reference"
]
},
{
"type": "null"
}
],
"title": "Reference Mode"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"expected_version",
"shot_ids",
"kind"
],
"title": "CandidateBatch"
}CandidateCreate
{
"properties": {
"expected_version": {
"type": "integer",
"minimum": 1.0,
"title": "Expected Version"
},
"output_folder_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Output Folder Id"
},
"shot_id": {
"type": "string",
"title": "Shot Id"
},
"kind": {
"type": "string",
"enum": [
"frame",
"video",
"end_frame"
],
"title": "Kind"
},
"count": {
"type": "integer",
"maximum": 4.0,
"minimum": 1.0,
"title": "Count",
"default": 1
},
"source_kind": {
"type": "string",
"enum": [
"generated",
"manual"
],
"title": "Source Kind",
"default": "generated"
},
"asset_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Asset Id"
},
"execution_mode": {
"type": "string",
"enum": [
"interactive",
"batch"
],
"title": "Execution Mode",
"default": "interactive"
},
"reference_mode": {
"anyOf": [
{
"type": "string",
"enum": [
"text",
"reference"
]
},
{
"type": "null"
}
],
"title": "Reference Mode"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"expected_version",
"shot_id",
"kind"
],
"title": "CandidateCreate"
}CaptionEdit
{
"properties": {
"audio_sha256": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
{
"type": "null"
}
],
"title": "Audio Sha256"
},
"id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"title": "Id"
},
"utterance_id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"title": "Utterance Id"
},
"source_text": {
"type": "string",
"maxLength": 2000,
"minLength": 1,
"title": "Source Text"
},
"source_start": {
"type": "integer",
"minimum": 0.0,
"title": "Source Start"
},
"source_end": {
"type": "integer",
"exclusiveMinimum": 0.0,
"title": "Source End"
},
"deleted": {
"type": "boolean",
"title": "Deleted",
"default": false
},
"text_override": {
"type": "boolean",
"title": "Text Override",
"default": false
},
"timing_override": {
"type": "boolean",
"title": "Timing Override",
"default": false
},
"text": {
"anyOf": [
{
"type": "string",
"maxLength": 2000
},
{
"type": "null"
}
],
"title": "Text"
},
"start_frame": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Start Frame"
},
"end_frame": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "End Frame"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"id",
"utterance_id",
"source_text",
"source_start",
"source_end"
],
"title": "CaptionEdit"
}CaptionPresentation
{
"properties": {
"punctuation": {
"type": "string",
"enum": [
"hide",
"preserve"
],
"title": "Punctuation"
},
"pacing": {
"type": "string",
"enum": [
"rhythm",
"sentence"
],
"title": "Pacing"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"punctuation",
"pacing"
],
"title": "CaptionPresentation"
}Cast
{
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"title": "Id"
},
"entity_id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"title": "Entity Id"
},
"form_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Form Id"
},
"appearance_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Appearance Id"
},
"position": {
"type": "string",
"title": "Position",
"default": ""
},
"action": {
"type": "string",
"title": "Action",
"default": ""
}
},
"additionalProperties": false,
"type": "object",
"required": [
"id",
"entity_id"
],
"title": "Cast"
}Context
{
"properties": {
"era": {
"type": "string",
"title": "Era",
"default": ""
},
"style": {
"type": "string",
"title": "Style",
"default": ""
},
"palette": {
"type": "string",
"title": "Palette",
"default": ""
},
"lighting": {
"type": "string",
"title": "Lighting",
"default": ""
},
"negative_prompt": {
"type": "string",
"title": "Negative Prompt",
"default": ""
}
},
"additionalProperties": false,
"type": "object",
"title": "Context"
}ContinuityState
{
"properties": {
"summary": {
"type": "string",
"title": "Summary",
"default": ""
},
"entities": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"title": "Entities"
},
"location": {
"type": "string",
"title": "Location",
"default": ""
},
"time": {
"type": "string",
"title": "Time",
"default": ""
},
"camera": {
"type": "string",
"title": "Camera",
"default": ""
},
"motion": {
"type": "string",
"title": "Motion",
"default": ""
}
},
"additionalProperties": false,
"type": "object",
"title": "ContinuityState"
}Control
{
"properties": {
"expected_version": {
"anyOf": [
{
"type": "integer",
"minimum": 1.0
},
{
"type": "null"
}
],
"title": "Expected Version"
}
},
"additionalProperties": false,
"type": "object",
"title": "Control"
}CreateUser
{
"properties": {
"username": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"title": "Username"
},
"password": {
"type": "string",
"maxLength": 256,
"minLength": 1,
"title": "Password"
},
"display_name": {
"type": "string",
"maxLength": 80,
"title": "Display Name",
"default": ""
}
},
"type": "object",
"required": [
"username",
"password"
],
"title": "CreateUser"
}Cue
{
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"title": "Id"
},
"anchor": {
"type": "string",
"enum": [
"absolute",
"shot",
"audio_segment"
],
"title": "Anchor"
},
"shot_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Shot Id"
},
"segment_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Segment Id"
},
"start_frame": {
"type": "integer",
"title": "Start Frame"
},
"end_frame": {
"type": "integer",
"title": "End Frame"
},
"text": {
"type": "string",
"maxLength": 2000,
"title": "Text"
},
"text_override": {
"type": "boolean",
"title": "Text Override",
"default": false
},
"timing_override": {
"type": "boolean",
"title": "Timing Override",
"default": false
}
},
"additionalProperties": false,
"type": "object",
"required": [
"id",
"anchor",
"start_frame",
"end_frame",
"text"
],
"title": "Cue"
}CueV3
{
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"title": "Id"
},
"anchor": {
"type": "string",
"enum": [
"absolute",
"shot",
"audio_segment",
"utterance"
],
"title": "Anchor"
},
"shot_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Shot Id"
},
"segment_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Segment Id"
},
"start_frame": {
"type": "integer",
"title": "Start Frame"
},
"end_frame": {
"type": "integer",
"title": "End Frame"
},
"text": {
"type": "string",
"maxLength": 2000,
"title": "Text"
},
"text_override": {
"type": "boolean",
"title": "Text Override",
"default": false
},
"timing_override": {
"type": "boolean",
"title": "Timing Override",
"default": false
},
"utterance_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Utterance Id"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"id",
"anchor",
"start_frame",
"end_frame",
"text"
],
"title": "CueV3"
}DialogueSequence
{
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"title": "Id"
},
"scene_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Scene Id"
},
"shot_ids": {
"items": {
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
"type": "array",
"maxItems": 1000,
"minItems": 1,
"title": "Shot Ids"
},
"utterance_ids": {
"items": {
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
"type": "array",
"maxItems": 1000,
"title": "Utterance Ids"
},
"timing_mode": {
"type": "string",
"enum": [
"auto",
"fixed"
],
"title": "Timing Mode",
"default": "auto"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"id",
"shot_ids"
],
"title": "DialogueSequence"
}DialogueSpeaker
{
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"title": "Id"
},
"entity_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Entity Id"
},
"name": {
"type": "string",
"maxLength": 120,
"minLength": 1,
"title": "Name"
},
"voice": {
"$ref": "#/components/schemas/DialogueVoice"
},
"native_voice": {
"anyOf": [
{
"type": "string",
"maxLength": 500,
"minLength": 1
},
{
"type": "null"
}
],
"title": "Native Voice"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"id",
"name"
],
"title": "DialogueSpeaker"
}DialogueSpeakerV6
{
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"title": "Id"
},
"entity_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Entity Id"
},
"name": {
"type": "string",
"maxLength": 120,
"minLength": 1,
"title": "Name"
},
"voice": {
"$ref": "#/components/schemas/DialogueVoice"
},
"native_voice": {
"anyOf": [
{
"type": "string",
"maxLength": 500,
"minLength": 1
},
{
"type": "null"
}
],
"title": "Native Voice"
},
"model_speaker_number": {
"anyOf": [
{
"type": "integer",
"maximum": 1000.0,
"minimum": 1.0
},
{
"type": "null"
}
],
"title": "Model Speaker Number"
},
"face_reference_asset_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Face Reference Asset Id"
},
"voice_reference_asset_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Voice Reference Asset Id"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"id",
"name"
],
"title": "DialogueSpeakerV6"
}DialogueSpec
{
"properties": {
"enabled": {
"type": "boolean",
"title": "Enabled",
"default": true
},
"generation": {
"anyOf": [
{
"type": "string",
"const": "native_av"
},
{
"type": "null"
}
],
"title": "Generation"
},
"language": {
"anyOf": [
{
"type": "string",
"maxLength": 80,
"minLength": 1
},
{
"type": "null"
}
],
"title": "Language"
},
"speakers": {
"items": {
"$ref": "#/components/schemas/DialogueSpeaker"
},
"type": "array",
"maxItems": 1000,
"title": "Speakers"
},
"utterances": {
"items": {
"$ref": "#/components/schemas/DialogueUtterance"
},
"type": "array",
"maxItems": 1000,
"title": "Utterances"
},
"sequences": {
"items": {
"$ref": "#/components/schemas/DialogueSequence"
},
"type": "array",
"maxItems": 1000,
"title": "Sequences"
}
},
"additionalProperties": false,
"type": "object",
"title": "DialogueSpec"
}DialogueSpecV6
{
"properties": {
"enabled": {
"type": "boolean",
"title": "Enabled",
"default": true
},
"generation": {
"type": "string",
"const": "native_av",
"title": "Generation",
"default": "native_av"
},
"language": {
"anyOf": [
{
"type": "string",
"maxLength": 80,
"minLength": 1
},
{
"type": "null"
}
],
"title": "Language"
},
"speakers": {
"items": {
"$ref": "#/components/schemas/DialogueSpeakerV6"
},
"type": "array",
"maxItems": 1000,
"title": "Speakers"
},
"utterances": {
"items": {
"$ref": "#/components/schemas/DialogueUtterance"
},
"type": "array",
"maxItems": 1000,
"title": "Utterances"
},
"sequences": {
"items": {
"$ref": "#/components/schemas/DialogueSequence"
},
"type": "array",
"maxItems": 1000,
"title": "Sequences"
}
},
"additionalProperties": false,
"type": "object",
"title": "DialogueSpecV6"
}DialogueUtterance
{
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"title": "Id"
},
"speaker_id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"title": "Speaker Id"
},
"text": {
"type": "string",
"maxLength": 2000,
"minLength": 1,
"title": "Text"
},
"spoken_text": {
"anyOf": [
{
"type": "string",
"maxLength": 2000,
"minLength": 1
},
{
"type": "null"
}
],
"title": "Spoken Text"
},
"source": {
"type": "string",
"enum": [
"tts",
"asset"
],
"title": "Source",
"default": "tts"
},
"asset_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Asset Id"
},
"source_start_sample": {
"type": "integer",
"minimum": 0.0,
"title": "Source Start Sample",
"default": 0
},
"source_end_sample": {
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0.0
},
{
"type": "null"
}
],
"title": "Source End Sample"
},
"gap_after_sample": {
"type": "integer",
"maximum": 14400000.0,
"minimum": 0.0,
"title": "Gap After Sample",
"default": 9600
},
"delivery": {
"type": "string",
"maxLength": 500,
"title": "Delivery",
"default": ""
},
"locked": {
"type": "boolean",
"title": "Locked",
"default": false
}
},
"additionalProperties": false,
"type": "object",
"required": [
"id",
"speaker_id",
"text"
],
"title": "DialogueUtterance"
}DialogueVoice
{
"properties": {
"provider": {
"type": "string",
"enum": [
"kokoro",
"voxcpm2"
],
"title": "Provider",
"default": "kokoro"
},
"model": {
"type": "string",
"maxLength": 120,
"minLength": 1,
"pattern": "^[\\w. -]+$",
"title": "Model",
"default": "kokoro-82m"
},
"voice": {
"type": "string",
"maxLength": 120,
"pattern": "^[\\w. -]*$",
"title": "Voice",
"default": "zf_xiaobei"
},
"reference_asset_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Reference Asset Id"
},
"reference_text": {
"type": "string",
"maxLength": 2000,
"title": "Reference Text",
"default": ""
},
"style": {
"type": "string",
"maxLength": 500,
"title": "Style",
"default": ""
},
"speed": {
"type": "number",
"maximum": 2.0,
"minimum": 0.5,
"title": "Speed",
"default": 1
},
"seed": {
"type": "integer",
"maximum": 4294967295.0,
"minimum": 0.0,
"title": "Seed",
"default": 42
},
"revision": {
"type": "integer",
"minimum": 1.0,
"title": "Revision",
"default": 1
}
},
"additionalProperties": false,
"type": "object",
"title": "DialogueVoice"
}DraftCreate
{
"properties": {
"folder_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Folder Id"
},
"name": {
"type": "string",
"maxLength": 255,
"minLength": 1,
"title": "Name",
"default": "多镜头工作流"
},
"kind": {
"type": "string",
"enum": [
"three_shot",
"multi_shot"
],
"title": "Kind",
"default": "multi_shot"
},
"spec": {
"$ref": "#/components/schemas/WorkflowSpec"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"spec"
],
"title": "DraftCreate"
}DraftPatch
{
"properties": {
"folder_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Folder Id"
},
"name": {
"anyOf": [
{
"type": "string",
"maxLength": 255,
"minLength": 1
},
{
"type": "null"
}
],
"title": "Name"
},
"spec": {
"anyOf": [
{
"$ref": "#/components/schemas/WorkflowSpec"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"type": "object",
"title": "DraftPatch"
}Edit
{
"properties": {
"start_frame": {
"type": "integer",
"minimum": 0.0,
"title": "Start Frame",
"default": 0
},
"duration_frames": {
"type": "integer",
"maximum": 360.0,
"minimum": 24.0,
"title": "Duration Frames",
"default": 120
}
},
"additionalProperties": false,
"type": "object",
"title": "Edit"
}EditV4
{
"properties": {
"start_frame": {
"type": "integer",
"minimum": 0.0,
"title": "Start Frame",
"default": 0
},
"duration_frames": {
"type": "integer",
"maximum": 360.0,
"minimum": 24.0,
"title": "Duration Frames",
"default": 120
},
"dedup_frames": {
"type": "integer",
"enum": [
0,
1
],
"title": "Dedup Frames",
"default": 0
}
},
"additionalProperties": false,
"type": "object",
"title": "EditV4"
}EditorAudio
{
"properties": {
"mode": {
"type": "string",
"enum": [
"silent",
"manual_track",
"generated_narration"
],
"title": "Mode",
"default": "silent"
},
"voice": {
"type": "string",
"title": "Voice",
"default": ""
},
"speed": {
"type": "number",
"maximum": 2.0,
"minimum": 0.5,
"title": "Speed",
"default": 1.0
},
"track": {
"anyOf": [
{
"$ref": "#/components/schemas/Audio"
},
{
"type": "null"
}
]
},
"segments": {
"items": {
"$ref": "#/components/schemas/AudioSegment"
},
"type": "array",
"maxItems": 1000,
"title": "Segments"
}
},
"additionalProperties": false,
"type": "object",
"title": "EditorAudio"
}EditorAudioV2
{
"properties": {
"mode": {
"type": "string",
"enum": [
"silent",
"manual_track",
"generated_narration"
],
"title": "Mode",
"default": "silent"
},
"voice": {
"type": "string",
"title": "Voice",
"default": ""
},
"speed": {
"type": "number",
"maximum": 2.0,
"minimum": 0.5,
"title": "Speed",
"default": 1.0
},
"track": {
"anyOf": [
{
"$ref": "#/components/schemas/AudioSelectionV2"
},
{
"$ref": "#/components/schemas/Audio"
},
{
"type": "null"
}
],
"title": "Track"
},
"segments": {
"items": {
"$ref": "#/components/schemas/AudioSegmentV2"
},
"type": "array",
"maxItems": 1000,
"title": "Segments"
},
"layers": {
"items": {
"$ref": "#/components/schemas/AudioLayerV2"
},
"type": "array",
"maxItems": 32,
"title": "Layers"
},
"ducking": {
"type": "boolean",
"title": "Ducking",
"default": true
}
},
"additionalProperties": false,
"type": "object",
"title": "EditorAudioV2"
}EditorAudioV3
{
"properties": {
"mode": {
"type": "string",
"enum": [
"silent",
"manual_track",
"generated_narration"
],
"title": "Mode",
"default": "silent"
},
"voice": {
"type": "string",
"title": "Voice",
"default": ""
},
"speed": {
"type": "number",
"maximum": 2.0,
"minimum": 0.5,
"title": "Speed",
"default": 1.0
},
"track": {
"anyOf": [
{
"$ref": "#/components/schemas/AudioSelectionV2"
},
{
"$ref": "#/components/schemas/Audio"
},
{
"type": "null"
}
],
"title": "Track"
},
"segments": {
"items": {
"$ref": "#/components/schemas/AudioSegmentV2"
},
"type": "array",
"maxItems": 1000,
"title": "Segments"
},
"layers": {
"items": {
"$ref": "#/components/schemas/AudioLayerV2"
},
"type": "array",
"maxItems": 32,
"title": "Layers"
},
"ducking": {
"type": "boolean",
"title": "Ducking",
"default": true
},
"mix_mode": {
"type": "string",
"enum": [
"composed",
"manual_mix"
],
"title": "Mix Mode",
"default": "composed"
}
},
"additionalProperties": false,
"type": "object",
"title": "EditorAudioV3"
}EditorCaptions
{
"properties": {
"mode": {
"type": "string",
"enum": [
"none",
"manual",
"script",
"ai_script"
],
"title": "Mode",
"default": "none"
},
"cues": {
"items": {
"$ref": "#/components/schemas/Cue"
},
"type": "array",
"maxItems": 1000,
"title": "Cues"
}
},
"additionalProperties": false,
"type": "object",
"title": "EditorCaptions"
}EditorCaptionsV3
{
"properties": {
"mode": {
"type": "string",
"enum": [
"none",
"manual",
"script",
"ai_script"
],
"title": "Mode",
"default": "none"
},
"cues": {
"items": {
"$ref": "#/components/schemas/CueV3"
},
"type": "array",
"maxItems": 1000,
"title": "Cues"
}
},
"additionalProperties": false,
"type": "object",
"title": "EditorCaptionsV3"
}EditorCaptionsV4
{
"properties": {
"mode": {
"type": "string",
"enum": [
"none",
"manual",
"script",
"ai_script"
],
"title": "Mode",
"default": "none"
},
"cues": {
"items": {
"$ref": "#/components/schemas/CueV3"
},
"type": "array",
"maxItems": 1000,
"title": "Cues"
},
"presentation": {
"anyOf": [
{
"$ref": "#/components/schemas/CaptionPresentation"
},
{
"type": "null"
}
]
},
"edits": {
"anyOf": [
{
"items": {
"$ref": "#/components/schemas/CaptionEdit"
},
"type": "array",
"maxItems": 3000
},
{
"type": "null"
}
],
"title": "Edits"
}
},
"additionalProperties": false,
"type": "object",
"title": "EditorCaptionsV4"
}EditorManifest
{
"properties": {
"editing_mode": {
"type": "string",
"enum": [
"auto",
"manual"
],
"title": "Editing Mode",
"default": "auto"
},
"base_run_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Base Run Id"
},
"schema_version": {
"type": "integer",
"const": 1,
"title": "Schema Version",
"default": 1
},
"source_kind": {
"type": "string",
"enum": [
"story",
"workflow"
],
"title": "Source Kind"
},
"spec": {
"additionalProperties": true,
"type": "object",
"title": "Spec"
},
"shot_ids": {
"items": {
"type": "string"
},
"type": "array",
"maxItems": 1000,
"minItems": 1,
"title": "Shot Ids"
},
"bindings": {
"additionalProperties": {
"$ref": "#/components/schemas/Binding"
},
"type": "object",
"maxProperties": 3000,
"title": "Bindings"
},
"audio": {
"$ref": "#/components/schemas/EditorAudio"
},
"captions": {
"$ref": "#/components/schemas/EditorCaptions"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"source_kind",
"spec",
"shot_ids"
],
"title": "EditorManifest"
}EditorManifestV2
{
"properties": {
"editing_mode": {
"type": "string",
"enum": [
"auto",
"manual"
],
"title": "Editing Mode",
"default": "auto"
},
"base_run_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Base Run Id"
},
"schema_version": {
"type": "integer",
"const": 2,
"title": "Schema Version",
"default": 2
},
"source_kind": {
"type": "string",
"enum": [
"story",
"workflow"
],
"title": "Source Kind"
},
"spec": {
"additionalProperties": true,
"type": "object",
"title": "Spec"
},
"shot_ids": {
"items": {
"type": "string"
},
"type": "array",
"maxItems": 1000,
"minItems": 1,
"title": "Shot Ids"
},
"bindings": {
"additionalProperties": {
"$ref": "#/components/schemas/BindingV2"
},
"type": "object",
"maxProperties": 5000,
"title": "Bindings"
},
"audio": {
"$ref": "#/components/schemas/EditorAudioV2"
},
"captions": {
"$ref": "#/components/schemas/EditorCaptions"
},
"production": {
"$ref": "#/components/schemas/ProductionPolicy"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"source_kind",
"spec",
"shot_ids"
],
"title": "EditorManifestV2"
}EditorManifestV3
{
"properties": {
"editing_mode": {
"type": "string",
"enum": [
"auto",
"manual"
],
"title": "Editing Mode",
"default": "auto"
},
"base_run_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Base Run Id"
},
"schema_version": {
"type": "integer",
"const": 3,
"title": "Schema Version",
"default": 3
},
"source_kind": {
"type": "string",
"enum": [
"story",
"workflow"
],
"title": "Source Kind"
},
"spec": {
"additionalProperties": true,
"type": "object",
"title": "Spec"
},
"shot_ids": {
"items": {
"type": "string"
},
"type": "array",
"maxItems": 1000,
"minItems": 1,
"title": "Shot Ids"
},
"bindings": {
"additionalProperties": {
"$ref": "#/components/schemas/BindingV2"
},
"type": "object",
"maxProperties": 5000,
"title": "Bindings"
},
"audio": {
"$ref": "#/components/schemas/EditorAudioV3"
},
"captions": {
"$ref": "#/components/schemas/EditorCaptionsV3"
},
"production": {
"$ref": "#/components/schemas/ProductionPolicy"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"source_kind",
"spec",
"shot_ids"
],
"title": "EditorManifestV3"
}EditorManifestV4
{
"properties": {
"editing_mode": {
"type": "string",
"enum": [
"auto",
"manual"
],
"title": "Editing Mode",
"default": "auto"
},
"base_run_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Base Run Id"
},
"schema_version": {
"type": "integer",
"const": 4,
"title": "Schema Version",
"default": 4
},
"source_kind": {
"type": "string",
"enum": [
"story",
"workflow"
],
"title": "Source Kind"
},
"spec": {
"additionalProperties": true,
"type": "object",
"title": "Spec"
},
"shot_ids": {
"items": {
"type": "string"
},
"type": "array",
"maxItems": 1000,
"minItems": 1,
"title": "Shot Ids"
},
"bindings": {
"additionalProperties": {
"$ref": "#/components/schemas/BindingV2"
},
"type": "object",
"maxProperties": 5000,
"title": "Bindings"
},
"audio": {
"$ref": "#/components/schemas/EditorAudioV3"
},
"captions": {
"$ref": "#/components/schemas/EditorCaptionsV4"
},
"production": {
"$ref": "#/components/schemas/ProductionPolicy"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"source_kind",
"spec",
"shot_ids"
],
"title": "EditorManifestV4"
}EditorMode
{
"properties": {
"expected_version": {
"type": "integer",
"minimum": 1.0,
"title": "Expected Version"
},
"mode": {
"type": "string",
"enum": [
"auto",
"manual"
],
"title": "Mode"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"expected_version",
"mode"
],
"title": "EditorMode"
}EmptyPayload
{
"properties": {},
"additionalProperties": false,
"type": "object",
"title": "EmptyPayload"
}EnableDialogue
{
"properties": {
"expected_version": {
"type": "integer",
"minimum": 1.0,
"title": "Expected Version"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"expected_version"
],
"title": "EnableDialogue"
}Entity
{
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"title": "Id"
},
"name": {
"type": "string",
"title": "Name",
"default": ""
},
"description": {
"type": "string",
"title": "Description",
"default": ""
},
"reference_asset_ids": {
"items": {
"type": "string"
},
"type": "array",
"title": "Reference Asset Ids"
},
"kind": {
"type": "string",
"enum": [
"person",
"creature",
"prop"
],
"title": "Kind",
"default": "person"
},
"forms": {
"items": {
"$ref": "#/components/schemas/Variant"
},
"type": "array",
"title": "Forms"
},
"appearances": {
"items": {
"$ref": "#/components/schemas/Variant"
},
"type": "array",
"title": "Appearances"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"id"
],
"title": "Entity"
}FolderAssign
{
"properties": {
"kind": {
"type": "string",
"enum": [
"assets",
"jobs",
"drafts",
"runs"
],
"title": "Kind"
},
"ids": {
"items": {
"type": "string"
},
"type": "array",
"maxItems": 200,
"minItems": 1,
"title": "Ids"
},
"folder_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Folder Id"
},
"mode": {
"type": "string",
"enum": [
"move",
"add"
],
"title": "Mode",
"default": "move"
}
},
"type": "object",
"required": [
"kind",
"ids",
"folder_id"
],
"title": "FolderAssign"
}FolderCreate
{
"properties": {
"name": {
"type": "string",
"maxLength": 255,
"minLength": 1,
"title": "Name"
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Parent Id"
}
},
"type": "object",
"required": [
"name"
],
"title": "FolderCreate"
}FolderPatch
{
"properties": {
"name": {
"anyOf": [
{
"type": "string",
"maxLength": 255,
"minLength": 1
},
{
"type": "null"
}
],
"title": "Name"
},
"parent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Parent Id"
}
},
"type": "object",
"title": "FolderPatch"
}ForkPrepared
{
"properties": {
"expected_version": {
"type": "integer",
"minimum": 1.0,
"title": "Expected Version"
},
"run_id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"title": "Run Id"
},
"name": {
"type": "string",
"maxLength": 255,
"minLength": 1,
"title": "Name"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"expected_version",
"run_id",
"name"
],
"title": "ForkPrepared"
}ForkSpeakerCuts
{
"properties": {
"expected_version": {
"type": "integer",
"minimum": 1.0,
"title": "Expected Version"
},
"shot_id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"title": "Shot Id"
},
"confirm": {
"type": "boolean",
"title": "Confirm",
"default": false
},
"name": {
"anyOf": [
{
"type": "string",
"maxLength": 120,
"minLength": 1
},
{
"type": "null"
}
],
"title": "Name"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"expected_version",
"shot_id"
],
"title": "ForkSpeakerCuts"
}FrameParameters
{
"properties": {
"seed": {
"type": "integer",
"maximum": 4294967295.0,
"minimum": 0.0,
"title": "Seed",
"default": 42
}
},
"additionalProperties": false,
"type": "object",
"title": "FrameParameters"
}HTTPValidationError
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}Login
{
"properties": {
"username": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"title": "Username"
},
"password": {
"type": "string",
"maxLength": 256,
"minLength": 1,
"title": "Password"
}
},
"type": "object",
"required": [
"username",
"password"
],
"title": "Login"
}NativeAvVideoParameters
{
"properties": {
"seed": {
"type": "integer",
"maximum": 4294967295.0,
"minimum": 0.0,
"title": "Seed",
"default": 42
},
"profile": {
"type": "string",
"enum": [
"minimax-h3-fl2va-native-av-v1",
"minimax-h3-fl2va-native-av-tp2-v1"
],
"title": "Profile"
},
"source_frames": {
"type": "integer",
"maximum": 345.0,
"minimum": 124.0,
"title": "Source Frames",
"default": 124
},
"num_inference_steps": {
"type": "integer",
"maximum": 100.0,
"minimum": 2.0,
"title": "Num Inference Steps",
"default": 50
},
"upscale": {
"type": "boolean",
"const": false,
"title": "Upscale",
"default": false
}
},
"additionalProperties": false,
"type": "object",
"required": [
"profile"
],
"title": "NativeAvVideoParameters"
}NativeVideoParameters
{
"properties": {
"seed": {
"type": "integer",
"maximum": 4294967295.0,
"minimum": 0.0,
"title": "Seed",
"default": 42
},
"profile": {
"type": "string",
"const": "minimax-h3-fl2va-bf16-v2",
"title": "Profile"
},
"source_frames": {
"type": "integer",
"maximum": 345.0,
"minimum": 124.0,
"title": "Source Frames",
"default": 124
},
"num_inference_steps": {
"type": "integer",
"maximum": 100.0,
"minimum": 2.0,
"title": "Num Inference Steps",
"default": 50
},
"upscale": {
"type": "boolean",
"title": "Upscale",
"default": false
}
},
"additionalProperties": false,
"type": "object",
"required": [
"profile"
],
"title": "NativeVideoParameters"
}Overrides
{
"properties": {
"time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Time"
},
"weather": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Weather"
},
"lighting": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Lighting"
},
"palette": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Palette"
}
},
"additionalProperties": false,
"type": "object",
"title": "Overrides"
}PasswordChange
{
"properties": {
"current_password": {
"type": "string",
"maxLength": 256,
"title": "Current Password"
},
"new_password": {
"type": "string",
"maxLength": 256,
"title": "New Password"
}
},
"type": "object",
"required": [
"current_password",
"new_password"
],
"title": "PasswordChange"
}PlanEditor
{
"properties": {
"expected_version": {
"type": "integer",
"minimum": 1.0,
"title": "Expected Version"
},
"output_goal": {
"type": "string",
"enum": [
"media",
"film",
"caption_film",
"caption_inspect",
"mix_film"
],
"title": "Output Goal",
"default": "film"
},
"targets": {
"items": {
"type": "string"
},
"type": "array",
"maxItems": 3002,
"title": "Targets"
},
"force": {
"items": {
"type": "string"
},
"type": "array",
"maxItems": 3002,
"title": "Force"
},
"execution_mode": {
"type": "string",
"enum": [
"interactive",
"batch"
],
"title": "Execution Mode",
"default": "interactive"
},
"output_folder_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Output Folder Id"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"expected_version"
],
"title": "PlanEditor"
}PreviewCaptions
{
"properties": {
"expected_version": {
"type": "integer",
"minimum": 1.0,
"title": "Expected Version"
},
"utterance_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Utterance Id"
},
"manifest": {
"anyOf": [
{
"$ref": "#/components/schemas/EditorManifest"
},
{
"$ref": "#/components/schemas/EditorManifestV2"
},
{
"$ref": "#/components/schemas/EditorManifestV3"
},
{
"$ref": "#/components/schemas/EditorManifestV4"
},
{
"type": "null"
}
],
"title": "Manifest"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"expected_version"
],
"title": "PreviewCaptions"
}ProductionPolicy
{
"properties": {
"max_shots": {
"type": "integer",
"maximum": 1000.0,
"minimum": 1.0,
"title": "Max Shots",
"default": 60
},
"max_total_frames": {
"type": "integer",
"minimum": 1.0,
"title": "Max Total Frames",
"default": 7200
},
"max_repairs_per_shot": {
"type": "integer",
"maximum": 2.0,
"minimum": 0.0,
"title": "Max Repairs Per Shot",
"default": 2
},
"max_total_repairs": {
"type": "integer",
"minimum": 0.0,
"title": "Max Total Repairs",
"default": 12
}
},
"additionalProperties": false,
"type": "object",
"title": "ProductionPolicy"
}Render
{
"properties": {
"fps": {
"type": "integer",
"const": 24,
"title": "Fps",
"default": 24
},
"total_frames": {
"anyOf": [
{
"type": "integer",
"maximum": 360000.0,
"minimum": 1.0
},
{
"type": "null"
}
],
"title": "Total Frames"
},
"fit": {
"type": "string",
"enum": [
"contain",
"cover"
],
"title": "Fit",
"default": "contain"
},
"audio": {
"anyOf": [
{
"$ref": "#/components/schemas/Audio"
},
{
"type": "null"
}
]
},
"subtitles": {
"items": {
"$ref": "#/components/schemas/Subtitle"
},
"type": "array",
"maxItems": 1000,
"title": "Subtitles"
},
"template_version": {
"type": "string",
"const": "plain-v1",
"title": "Template Version",
"default": "plain-v1"
}
},
"additionalProperties": false,
"type": "object",
"title": "Render"
}RenderCreate
{
"properties": {
"expected_version": {
"type": "integer",
"minimum": 1.0,
"title": "Expected Version"
},
"output_folder_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Output Folder Id"
},
"execution_mode": {
"type": "string",
"enum": [
"interactive",
"batch"
],
"title": "Execution Mode",
"default": "interactive"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"expected_version"
],
"title": "RenderCreate"
}RenderV4
{
"properties": {
"fps": {
"type": "integer",
"const": 24,
"title": "Fps",
"default": 24
},
"total_frames": {
"anyOf": [
{
"type": "integer",
"maximum": 360000.0,
"minimum": 1.0
},
{
"type": "null"
}
],
"title": "Total Frames"
},
"fit": {
"type": "string",
"enum": [
"contain",
"cover"
],
"title": "Fit",
"default": "contain"
},
"audio": {
"anyOf": [
{
"$ref": "#/components/schemas/AudioSelectionV2"
},
{
"$ref": "#/components/schemas/Audio"
},
{
"type": "null"
}
],
"title": "Audio"
},
"subtitles": {
"items": {
"$ref": "#/components/schemas/Subtitle"
},
"type": "array",
"maxItems": 1000,
"title": "Subtitles"
},
"template_version": {
"type": "string",
"const": "plain-v1",
"title": "Template Version",
"default": "plain-v1"
}
},
"additionalProperties": false,
"type": "object",
"title": "RenderV4"
}RestoreEditor
{
"properties": {
"expected_version": {
"type": "integer",
"minimum": 1.0,
"title": "Expected Version"
},
"run_id": {
"type": "string",
"maxLength": 32,
"minLength": 1,
"title": "Run Id"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"expected_version",
"run_id"
],
"title": "RestoreEditor"
}RestoreManualFrame
{
"properties": {
"expected_run_version": {
"type": "integer",
"minimum": 1.0,
"title": "Expected Run Version"
},
"target_job_id": {
"type": "string",
"title": "Target Job Id"
},
"rejected_review_job_id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"title": "Rejected Review Job Id"
},
"frame_asset_id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"title": "Frame Asset Id"
},
"frame_sha256": {
"type": "string",
"pattern": "^[0-9a-f]{64}$",
"title": "Frame Sha256"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"expected_run_version",
"target_job_id",
"rejected_review_job_id",
"frame_asset_id",
"frame_sha256"
],
"title": "RestoreManualFrame"
}Retry
{
"properties": {
"expected_run_version": {
"type": "integer",
"minimum": 1.0,
"title": "Expected Run Version"
},
"target_job_id": {
"type": "string",
"title": "Target Job Id"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"expected_run_version",
"target_job_id"
],
"title": "Retry"
}ReviewTurns
{
"properties": {
"expected_version": {
"type": "integer",
"minimum": 1.0,
"title": "Expected Version"
},
"report_sha256": {
"type": "string",
"pattern": "^[0-9a-f]{64}$",
"title": "Report Sha256"
},
"decision": {
"type": "string",
"const": "accept",
"title": "Decision"
},
"note": {
"type": "string",
"maxLength": 1000,
"minLength": 1,
"title": "Note"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"expected_version",
"report_sha256",
"decision",
"note"
],
"title": "ReviewTurns"
}RunCreate
{
"properties": {
"output_folder_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Output Folder Id"
},
"draft_revision": {
"type": "integer",
"minimum": 1.0,
"title": "Draft Revision"
},
"expected_version": {
"type": "integer",
"minimum": 1.0,
"title": "Expected Version"
},
"execution_mode": {
"type": "string",
"enum": [
"interactive",
"batch"
],
"title": "Execution Mode",
"default": "interactive"
},
"reuse_run_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Reuse Run Id"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"draft_revision",
"expected_version"
],
"title": "RunCreate"
}SaveEditor
{
"properties": {
"expected_version": {
"type": "integer",
"minimum": 1.0,
"title": "Expected Version"
},
"manifest": {
"anyOf": [
{
"$ref": "#/components/schemas/EditorManifest"
},
{
"$ref": "#/components/schemas/EditorManifestV2"
},
{
"$ref": "#/components/schemas/EditorManifestV3"
},
{
"$ref": "#/components/schemas/EditorManifestV4"
}
],
"title": "Manifest"
},
"name": {
"anyOf": [
{
"type": "string",
"maxLength": 255,
"minLength": 1
},
{
"type": "null"
}
],
"title": "Name"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"expected_version",
"manifest"
],
"title": "SaveEditor"
}Scene
{
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"title": "Id"
},
"name": {
"type": "string",
"title": "Name",
"default": ""
},
"description": {
"type": "string",
"title": "Description",
"default": ""
},
"reference_asset_ids": {
"items": {
"type": "string"
},
"type": "array",
"title": "Reference Asset Ids"
},
"location": {
"type": "string",
"title": "Location",
"default": ""
},
"time": {
"type": "string",
"title": "Time",
"default": ""
},
"weather": {
"type": "string",
"title": "Weather",
"default": ""
},
"lighting": {
"type": "string",
"title": "Lighting",
"default": ""
}
},
"additionalProperties": false,
"type": "object",
"required": [
"id"
],
"title": "Scene"
}SelectionClear
{
"properties": {
"expected_version": {
"type": "integer",
"minimum": 1.0,
"title": "Expected Version"
},
"shot_id": {
"type": "string",
"title": "Shot Id"
},
"kind": {
"type": "string",
"enum": [
"frame",
"video",
"end_frame"
],
"title": "Kind"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"expected_version",
"shot_id",
"kind"
],
"title": "SelectionClear"
}SelectionCreate
{
"properties": {
"expected_version": {
"type": "integer",
"minimum": 1.0,
"title": "Expected Version"
},
"shot_id": {
"type": "string",
"title": "Shot Id"
},
"kind": {
"type": "string",
"enum": [
"frame",
"video",
"end_frame"
],
"title": "Kind"
},
"candidate_id": {
"type": "string",
"title": "Candidate Id"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"expected_version",
"shot_id",
"kind",
"candidate_id"
],
"title": "SelectionCreate"
}Shot
{
"properties": {
"key": {
"type": "string",
"pattern": "^shot_[1-9][0-9]{0,3}$",
"title": "Key"
},
"prompt": {
"type": "string",
"maxLength": 8000,
"minLength": 1,
"title": "Prompt"
},
"duration_frames": {
"type": "integer",
"maximum": 360.0,
"minimum": 24.0,
"title": "Duration Frames",
"default": 120
},
"image_asset_id": {
"anyOf": [
{
"type": "string",
"maxLength": 64,
"minLength": 1
},
{
"type": "null"
}
],
"title": "Image Asset Id"
},
"parameters": {
"$ref": "#/components/schemas/ShotParameters"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"key",
"prompt"
],
"title": "Shot"
}ShotContinuity
{
"properties": {
"transition": {
"type": "string",
"enum": [
"cut",
"continue",
"scene_change"
],
"title": "Transition",
"default": "cut"
},
"group_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Group Id"
},
"state_in": {
"$ref": "#/components/schemas/ContinuityState"
},
"state_out": {
"$ref": "#/components/schemas/ContinuityState"
},
"end_prompt": {
"type": "string",
"title": "End Prompt",
"default": ""
},
"expected_motion": {
"type": "boolean",
"title": "Expected Motion",
"default": true
},
"endpoint_mode": {
"type": "string",
"enum": [
"first_frame",
"first_last_frame"
],
"title": "Endpoint Mode",
"default": "first_frame"
}
},
"additionalProperties": false,
"type": "object",
"title": "ShotContinuity"
}ShotParameters
{
"properties": {
"seed": {
"type": "integer",
"maximum": 4294967295.0,
"minimum": 0.0,
"title": "Seed",
"default": 42
},
"profile": {
"anyOf": [
{
"type": "string",
"enum": [
"minimax-h3-fl2va-bf16-v1",
"minimax-h3-fl2va-bf16-tp2-v1",
"wan2.2-ti2v-5b-v1"
]
},
{
"type": "null"
}
],
"title": "Profile"
}
},
"additionalProperties": false,
"type": "object",
"title": "ShotParameters"
}ShotPerformance
{
"properties": {
"sequence_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Sequence Id"
},
"native_utterance_ids": {
"anyOf": [
{
"items": {
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
"type": "array",
"maxItems": 1000
},
{
"type": "null"
}
],
"title": "Native Utterance Ids"
},
"visible_speaker_ids": {
"items": {
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
"type": "array",
"maxItems": 2,
"title": "Visible Speaker Ids"
},
"lip_sync": {
"type": "string",
"enum": [
"auto",
"required",
"off"
],
"title": "Lip Sync",
"default": "auto"
},
"audio_context_shift_frames": {
"type": "integer",
"maximum": 6.0,
"minimum": -6.0,
"title": "Audio Context Shift Frames",
"default": 0
},
"duration_mode": {
"type": "string",
"enum": [
"auto",
"fixed"
],
"title": "Duration Mode",
"default": "auto"
},
"structure_locked": {
"type": "boolean",
"title": "Structure Locked",
"default": false
},
"original_audio": {
"type": "string",
"enum": [
"discard",
"preserve"
],
"title": "Original Audio",
"default": "discard"
}
},
"additionalProperties": false,
"type": "object",
"title": "ShotPerformance"
}ShotPerformanceV6
{
"properties": {
"sequence_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Sequence Id"
},
"native_utterance_ids": {
"anyOf": [
{
"items": {
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
"type": "array",
"maxItems": 1000
},
{
"type": "null"
}
],
"title": "Native Utterance Ids"
},
"visible_speaker_ids": {
"items": {
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
"type": "array",
"maxItems": 2,
"title": "Visible Speaker Ids"
},
"lip_sync": {
"type": "string",
"enum": [
"auto",
"required",
"off"
],
"title": "Lip Sync",
"default": "auto"
},
"audio_context_shift_frames": {
"type": "integer",
"maximum": 6.0,
"minimum": -6.0,
"title": "Audio Context Shift Frames",
"default": 0
},
"duration_mode": {
"type": "string",
"enum": [
"auto",
"fixed"
],
"title": "Duration Mode",
"default": "auto"
},
"structure_locked": {
"type": "boolean",
"title": "Structure Locked",
"default": false
},
"original_audio": {
"type": "string",
"enum": [
"discard",
"preserve"
],
"title": "Original Audio",
"default": "discard"
},
"dialogue_staging": {
"anyOf": [
{
"type": "string",
"const": "two_person_turns"
},
{
"type": "null"
}
],
"title": "Dialogue Staging"
},
"first_frame_sha256": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
{
"type": "null"
}
],
"title": "First Frame Sha256"
},
"listener_reactions": {
"patternProperties": {
"^[0-9a-f]{32}$": {
"type": "string",
"maxLength": 500
}
},
"type": "object",
"maxProperties": 1000,
"title": "Listener Reactions"
}
},
"additionalProperties": false,
"type": "object",
"title": "ShotPerformanceV6"
}StartEditor
{
"properties": {
"expected_version": {
"type": "integer",
"minimum": 1.0,
"title": "Expected Version"
},
"output_goal": {
"type": "string",
"enum": [
"media",
"film",
"caption_film",
"caption_inspect",
"mix_film"
],
"title": "Output Goal",
"default": "film"
},
"targets": {
"items": {
"type": "string"
},
"type": "array",
"maxItems": 3002,
"title": "Targets"
},
"force": {
"items": {
"type": "string"
},
"type": "array",
"maxItems": 3002,
"title": "Force"
},
"execution_mode": {
"type": "string",
"enum": [
"interactive",
"batch"
],
"title": "Execution Mode",
"default": "interactive"
},
"output_folder_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Output Folder Id"
},
"expected_plan_hash": {
"type": "string",
"pattern": "^[0-9a-f]{64}$",
"title": "Expected Plan Hash"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"expected_version",
"expected_plan_hash"
],
"title": "StartEditor"
}StoryCreate
{
"properties": {
"captions_mode": {
"anyOf": [
{
"type": "string",
"enum": [
"none",
"manual",
"script",
"ai_script"
]
},
{
"type": "null"
}
],
"title": "Captions Mode"
},
"caption_presentation": {
"anyOf": [
{
"$ref": "#/components/schemas/CaptionPresentation"
},
{
"type": "null"
}
]
},
"create_folder": {
"type": "boolean",
"title": "Create Folder",
"default": true
},
"folder_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Folder Id"
},
"name": {
"type": "string",
"maxLength": 255,
"minLength": 1,
"title": "Name"
},
"spec": {
"anyOf": [
{
"$ref": "#/components/schemas/StorySpecV3"
},
{
"$ref": "#/components/schemas/StorySpecV4"
},
{
"$ref": "#/components/schemas/StorySpecV5"
},
{
"$ref": "#/components/schemas/StorySpecV6"
}
],
"title": "Spec"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"name",
"spec"
],
"title": "StoryCreate"
}StoryPatch
{
"properties": {
"folder_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Folder Id"
},
"name": {
"anyOf": [
{
"type": "string",
"maxLength": 255,
"minLength": 1
},
{
"type": "null"
}
],
"title": "Name"
},
"spec": {
"anyOf": [
{
"$ref": "#/components/schemas/StorySpecV3"
},
{
"$ref": "#/components/schemas/StorySpecV4"
},
{
"$ref": "#/components/schemas/StorySpecV5"
},
{
"$ref": "#/components/schemas/StorySpecV6"
},
{
"type": "null"
}
],
"title": "Spec"
}
},
"additionalProperties": false,
"type": "object",
"title": "StoryPatch"
}StoryShot
{
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"title": "Id"
},
"name": {
"type": "string",
"title": "Name",
"default": ""
},
"scene_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Scene Id"
},
"cast": {
"items": {
"$ref": "#/components/schemas/Cast"
},
"type": "array",
"title": "Cast"
},
"visual_prompt": {
"type": "string",
"maxLength": 8000,
"title": "Visual Prompt",
"default": ""
},
"motion_prompt": {
"type": "string",
"maxLength": 8000,
"title": "Motion Prompt",
"default": ""
},
"overrides": {
"$ref": "#/components/schemas/Overrides"
},
"frame_parameters": {
"$ref": "#/components/schemas/FrameParameters"
},
"video_parameters": {
"$ref": "#/components/schemas/VideoParameters"
},
"edit": {
"$ref": "#/components/schemas/Edit"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"id"
],
"title": "StoryShot"
}StoryShotV4
{
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"title": "Id"
},
"name": {
"type": "string",
"title": "Name",
"default": ""
},
"scene_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Scene Id"
},
"cast": {
"items": {
"$ref": "#/components/schemas/Cast"
},
"type": "array",
"title": "Cast"
},
"visual_prompt": {
"type": "string",
"maxLength": 8000,
"title": "Visual Prompt",
"default": ""
},
"motion_prompt": {
"type": "string",
"maxLength": 8000,
"title": "Motion Prompt",
"default": ""
},
"overrides": {
"$ref": "#/components/schemas/Overrides"
},
"frame_parameters": {
"$ref": "#/components/schemas/FrameParameters"
},
"video_parameters": {
"anyOf": [
{
"$ref": "#/components/schemas/NativeVideoParameters"
},
{
"$ref": "#/components/schemas/VideoParameters"
}
],
"title": "Video Parameters"
},
"edit": {
"$ref": "#/components/schemas/EditV4"
},
"continuity": {
"$ref": "#/components/schemas/ShotContinuity"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"id"
],
"title": "StoryShotV4"
}StoryShotV5
{
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"title": "Id"
},
"name": {
"type": "string",
"title": "Name",
"default": ""
},
"scene_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Scene Id"
},
"cast": {
"items": {
"$ref": "#/components/schemas/Cast"
},
"type": "array",
"title": "Cast"
},
"visual_prompt": {
"type": "string",
"maxLength": 8000,
"title": "Visual Prompt",
"default": ""
},
"motion_prompt": {
"type": "string",
"maxLength": 8000,
"title": "Motion Prompt",
"default": ""
},
"overrides": {
"$ref": "#/components/schemas/Overrides"
},
"frame_parameters": {
"$ref": "#/components/schemas/FrameParameters"
},
"video_parameters": {
"anyOf": [
{
"$ref": "#/components/schemas/NativeAvVideoParameters"
},
{
"$ref": "#/components/schemas/NativeVideoParameters"
},
{
"$ref": "#/components/schemas/VideoParameters"
}
],
"title": "Video Parameters"
},
"edit": {
"$ref": "#/components/schemas/EditV4"
},
"continuity": {
"$ref": "#/components/schemas/ShotContinuity"
},
"performance": {
"$ref": "#/components/schemas/ShotPerformance"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"id"
],
"title": "StoryShotV5"
}StoryShotV6
{
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"title": "Id"
},
"name": {
"type": "string",
"title": "Name",
"default": ""
},
"scene_id": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{32}$"
},
{
"type": "null"
}
],
"title": "Scene Id"
},
"cast": {
"items": {
"$ref": "#/components/schemas/Cast"
},
"type": "array",
"title": "Cast"
},
"visual_prompt": {
"type": "string",
"maxLength": 8000,
"title": "Visual Prompt",
"default": ""
},
"motion_prompt": {
"type": "string",
"maxLength": 8000,
"title": "Motion Prompt",
"default": ""
},
"overrides": {
"$ref": "#/components/schemas/Overrides"
},
"frame_parameters": {
"$ref": "#/components/schemas/FrameParameters"
},
"video_parameters": {
"anyOf": [
{
"$ref": "#/components/schemas/NativeAvVideoParameters"
},
{
"$ref": "#/components/schemas/NativeVideoParameters"
},
{
"$ref": "#/components/schemas/VideoParameters"
}
],
"title": "Video Parameters"
},
"edit": {
"$ref": "#/components/schemas/EditV4"
},
"continuity": {
"$ref": "#/components/schemas/ShotContinuity"
},
"performance": {
"$ref": "#/components/schemas/ShotPerformanceV6"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"id"
],
"title": "StoryShotV6"
}StorySpecV3
{
"properties": {
"schema_version": {
"type": "integer",
"const": 3,
"title": "Schema Version",
"default": 3
},
"profile": {
"type": "string",
"enum": [
"landscape_1080_v1",
"portrait_1080_v1"
],
"title": "Profile",
"default": "landscape_1080_v1"
},
"context": {
"$ref": "#/components/schemas/Context"
},
"scenes": {
"items": {
"$ref": "#/components/schemas/Scene"
},
"type": "array",
"title": "Scenes"
},
"entities": {
"items": {
"$ref": "#/components/schemas/Entity"
},
"type": "array",
"title": "Entities"
},
"shots": {
"items": {
"$ref": "#/components/schemas/StoryShot"
},
"type": "array",
"maxItems": 1000,
"minItems": 1,
"title": "Shots"
},
"render": {
"$ref": "#/components/schemas/Render"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"shots"
],
"title": "StorySpecV3"
}StorySpecV4
{
"properties": {
"schema_version": {
"type": "integer",
"const": 4,
"title": "Schema Version",
"default": 4
},
"profile": {
"type": "string",
"enum": [
"landscape_1080_v1",
"portrait_1080_v1"
],
"title": "Profile",
"default": "landscape_1080_v1"
},
"context": {
"$ref": "#/components/schemas/Context"
},
"scenes": {
"items": {
"$ref": "#/components/schemas/Scene"
},
"type": "array",
"title": "Scenes"
},
"entities": {
"items": {
"$ref": "#/components/schemas/Entity"
},
"type": "array",
"title": "Entities"
},
"shots": {
"items": {
"$ref": "#/components/schemas/StoryShotV4"
},
"type": "array",
"maxItems": 1000,
"minItems": 1,
"title": "Shots"
},
"render": {
"$ref": "#/components/schemas/RenderV4"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"shots"
],
"title": "StorySpecV4"
}StorySpecV5
{
"properties": {
"schema_version": {
"type": "integer",
"const": 5,
"title": "Schema Version",
"default": 5
},
"profile": {
"type": "string",
"enum": [
"landscape_1080_v1",
"portrait_1080_v1"
],
"title": "Profile",
"default": "landscape_1080_v1"
},
"context": {
"$ref": "#/components/schemas/Context"
},
"scenes": {
"items": {
"$ref": "#/components/schemas/Scene"
},
"type": "array",
"title": "Scenes"
},
"entities": {
"items": {
"$ref": "#/components/schemas/Entity"
},
"type": "array",
"title": "Entities"
},
"shots": {
"items": {
"$ref": "#/components/schemas/StoryShotV5"
},
"type": "array",
"maxItems": 1000,
"minItems": 1,
"title": "Shots"
},
"render": {
"$ref": "#/components/schemas/RenderV4"
},
"dialogue": {
"$ref": "#/components/schemas/DialogueSpec"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"shots"
],
"title": "StorySpecV5"
}StorySpecV6
{
"properties": {
"schema_version": {
"type": "integer",
"const": 6,
"title": "Schema Version",
"default": 6
},
"profile": {
"type": "string",
"enum": [
"landscape_1080_v1",
"portrait_1080_v1"
],
"title": "Profile",
"default": "landscape_1080_v1"
},
"context": {
"$ref": "#/components/schemas/Context"
},
"scenes": {
"items": {
"$ref": "#/components/schemas/Scene"
},
"type": "array",
"title": "Scenes"
},
"entities": {
"items": {
"$ref": "#/components/schemas/Entity"
},
"type": "array",
"title": "Entities"
},
"shots": {
"items": {
"$ref": "#/components/schemas/StoryShotV6"
},
"type": "array",
"maxItems": 1000,
"minItems": 1,
"title": "Shots"
},
"render": {
"$ref": "#/components/schemas/RenderV4"
},
"dialogue": {
"$ref": "#/components/schemas/DialogueSpecV6"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"shots"
],
"title": "StorySpecV6"
}Submit
{
"properties": {
"execution_mode": {
"type": "string",
"enum": [
"interactive",
"batch"
],
"title": "Execution Mode",
"default": "interactive"
},
"task_type": {
"type": "string",
"title": "Task Type"
},
"input": {
"additionalProperties": true,
"type": "object",
"title": "Input"
},
"parameters": {
"additionalProperties": true,
"type": "object",
"title": "Parameters"
},
"count": {
"type": "integer",
"maximum": 4.0,
"minimum": 1.0,
"title": "Count",
"default": 1
},
"scheduled_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Scheduled At"
},
"folder_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Folder Id"
},
"output_folder_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Output Folder Id"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"task_type"
],
"title": "Submit"
}Subtitle
{
"properties": {
"start_frame": {
"type": "integer",
"minimum": 0.0,
"title": "Start Frame"
},
"end_frame": {
"type": "integer",
"exclusiveMinimum": 0.0,
"title": "End Frame"
},
"text": {
"type": "string",
"maxLength": 2000,
"minLength": 1,
"title": "Text"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"start_frame",
"end_frame",
"text"
],
"title": "Subtitle"
}TokenInput
{
"properties": {
"name": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"title": "Name"
},
"scopes": {
"items": {
"type": "string"
},
"type": "array",
"maxItems": 20,
"title": "Scopes"
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Expires At"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"name",
"scopes"
],
"title": "TokenInput"
}UserPatch
{
"properties": {
"display_name": {
"anyOf": [
{
"type": "string",
"maxLength": 80,
"minLength": 1
},
{
"type": "null"
}
],
"title": "Display Name"
},
"disabled": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Disabled"
}
},
"type": "object",
"title": "UserPatch"
}UsernameChange
{
"properties": {
"username": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"title": "Username"
},
"current_password": {
"type": "string",
"maxLength": 256,
"title": "Current Password"
}
},
"type": "object",
"required": [
"username",
"current_password"
],
"title": "UsernameChange"
}ValidationError
{
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
},
"input": {
"title": "Input"
},
"ctx": {
"type": "object",
"title": "Context"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
}Variant
{
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-f]{32}$",
"title": "Id"
},
"name": {
"type": "string",
"title": "Name",
"default": ""
},
"description": {
"type": "string",
"title": "Description",
"default": ""
},
"reference_asset_ids": {
"items": {
"type": "string"
},
"type": "array",
"title": "Reference Asset Ids"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"id"
],
"title": "Variant"
}Version
{
"properties": {
"expected_version": {
"type": "integer",
"minimum": 1.0,
"title": "Expected Version"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"expected_version"
],
"title": "Version"
}VideoParameters
{
"properties": {
"seed": {
"type": "integer",
"maximum": 4294967295.0,
"minimum": 0.0,
"title": "Seed",
"default": 42
},
"profile": {
"anyOf": [
{
"type": "string",
"enum": [
"minimax-h3-fl2va-bf16-v1",
"minimax-h3-fl2va-bf16-tp2-v1",
"wan2.2-ti2v-5b-v1"
]
},
{
"type": "null"
}
],
"title": "Profile"
},
"source_seconds": {
"type": "integer",
"maximum": 15.0,
"minimum": 1.0,
"title": "Source Seconds",
"default": 5
},
"num_inference_steps": {
"type": "integer",
"maximum": 100.0,
"minimum": 1.0,
"title": "Num Inference Steps",
"default": 50
},
"guidance_scale": {
"type": "number",
"maximum": 20.0,
"minimum": 1.0,
"title": "Guidance Scale",
"default": 5.0
},
"upscale": {
"type": "boolean",
"title": "Upscale",
"default": true
}
},
"additionalProperties": false,
"type": "object",
"title": "VideoParameters"
}WorkflowSpec
{
"properties": {
"schema_version": {
"type": "integer",
"enum": [
1,
2
],
"title": "Schema Version",
"default": 1
},
"shots": {
"items": {
"$ref": "#/components/schemas/Shot"
},
"type": "array",
"maxItems": 1000,
"minItems": 1,
"title": "Shots"
},
"profile": {
"type": "string",
"enum": [
"landscape_1080_v1",
"portrait_1080_v1"
],
"title": "Profile",
"default": "landscape_1080_v1"
},
"render": {
"$ref": "#/components/schemas/Render"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"shots"
],
"title": "WorkflowSpec"
}