跳转到主要内容
POST
创建动作

授权

Authorization
string
header
必填

以 Authorization: Bearer <API key> 的形式发送 API 密钥。密钥以 sk- 开头。缺少密钥或密钥无效时返回 401 UNAUTHENTICATED。切勿在浏览器代码中暴露 API 密钥。

请求头

X-Request-Id
string

可选,调用方提供的关联 ID,会原样回显在响应头中。不传则由服务生成。用于链路追踪和技术支持。

Minimum string length: 1

请求体

源视频必须且只能通过 motion_video、motion_video_url 或向后兼容的别名 video_url 之一提供。type 决定据此生成什么——见 createMotion。type 之后的字段仅在其为 glb 或 all 时适用。这是完整的公开契约;暂存路径、输出位置、提取模板、角色 PKL、关节配置和跟踪遮罩均由服务管理。

motion_video
file

直接上传的驱动视频。motion_video 和 motion_video_url 必须且只能提供一个。

motion_video_url
string<uri>

驱动视频的公网可访问 URL。用于替代 motion_video,并在拉取期间保持可访问。

video_url
string<uri>
已弃用

motion_video_url 的向后兼容别名。不要同时发送两个 URL 字段。

name
string
默认值:""

render 或 all 的可选名称。仅 glb 的动作目前返回空名称。

model
enum<string>

type=render 或 all 使用的可选 2D 预处理模型。对仅 glb 的请求不起作用。省略则使用服务默认值。

可用选项:
V3,
v3,
V3_Preview,
V4,
v4,
V4_Preview,
V4_BaseSG
thumbnail_path
string

type=render 或 all 所创建的可复用 2D 动作的可选现有缩略图 URI/路径。对 type=glb 不起作用。

thumbnail_url
string<uri>
已弃用

thumbnail_path 的向后兼容别名,仅限 multipart。不要同时发送两个字段。

type
enum<string>
默认值:render

要生成的输出:render 生成可复用的 2D 动作(不单独收取预处理费用),glb 只生成 3D 动画(按源视频每秒 5 积分,向上取整),all 两者都生成。

可用选项:
render,
glb,
all
enable_smoothing
boolean
默认值:false

3D 提取时是否进行动作平滑。仅适用于 type=glb 或 all,可减少帧间抖动。

target_fps
number
默认值:25

提取及 GLB 时间轴的目标帧率。省略则使用提取服务默认的 25 FPS。取值必须大于 0,仅适用于 type=glb 或 all。

必填范围: x > 0
smooth_velocity_threshold
number
默认值:0.12

时间平滑使用的速度阈值。仅在 enable_smoothing=true 时适用。

必填范围: x >= 0
apply_std_joints
boolean
默认值:true

动态提取是否应用标准关节归一化。

render_mp4
boolean
默认值:false

同时渲染 3D 动画的 MP4 预览,在 GET /v1/motions/{motion_id}/export 中以 mp4_url 返回。需要 type=glb 或 all(type=render 时返回 400)。不影响价格。

task_id
string

type=glb 时由客户端提供的任务 ID。type=all 时,服务使用 Motion ID 作为配套提取任务的键。重复使用 ID 会返回 409 ID_ALREADY_EXISTS,不会重放原始响应。长度 1–200 个字符:字母、数字、_、. 和 -,须以字母或数字开头。

Required string length: 1 - 200
Pattern: ^[A-Za-z0-9][A-Za-z0-9_.-]*$

响应

动作已进入排队。

角色或动作资产。两种资源共用同一种数据结构。

progress 和 error 始终为 null,failed 的资产也是如此:请通过 status 判断是否失败,通过 vsplat.error 或 glb.error 查看提取失败。

type 反映创建时请求的内容。角色为 render、vsplat 或 all;动作为 render、glb 或 all。在 type 引入之前创建的资产报告为 render。vsplat 和 glb 携带对应提取任务自身的状态——从不包含下载链接,下载链接需通过 GET /v1/characters/{character_id}/export 或 GET /v1/motions/{motion_id}/export 获取——且仅在 type 请求了该提取时才不为 null。对于 all 资产,只有 2D 渲染和 3D 提取都就绪后,顶层 status 才会变为 ready;任一失败时,顶层 status 为 failed,而子对象自身的 status 仍会显示是哪一个失败。

id
string
必填

公开的资产标识符。Character ID 通常以 char_ 开头;Motion ID 通常以 mot_ 开头。

Minimum string length: 1
status
enum<string>
必填

资产的整体生命周期。pending 表示已创建但尚未排队,可按 queued 处理。仅当所需能力变为 ready 后,才可将资产用于渲染或导出。

可用选项:
pending,
queued,
processing,
ready,
failed
name
string
必填

创建时提供或导入时生成的显示名称;不接受名称的流程中可能为空。

progress
integer | null
必填

预留字段;目前始终为 null。请改为轮询 status。

必填范围: 0 <= x <= 100
capabilities
string[]
必填

资产的可用用途。资产就绪后会出现 video_render。

created_at
string | null
必填

带 UTC 偏移的 ISO 8601 时间戳,例如 2026-07-31T09:15:22+00:00。

completed_at
string | null
必填

所有请求的处理都进入终态时的时间戳(ISO 8601,带 UTC 偏移);仍在处理时为 null。

error
object | null
必填

预留的顶层失败详情。目前始终为 null;请通过 status 判断失败,并在适用时查看提取子对象。

type
enum<string>
默认值:render
必填

创建资产时请求的处理内容。render 生成可直接用于 2D 渲染的资产,vsplat/glb 请求 3D 输出,all 请求两种支持的输出。

可用选项:
render,
vsplat,
glb,
all
vsplat
object | null
必填

角色的 vsplat 提取状态。动作以及 type 为 render 的角色为 null。创建时提交的请求参数(如 model_precision)不会在此回显——这里只有状态。

glb
object | null
必填

动作的 3D 动画提取/生成状态。角色以及 type 为 render 的动作为 null。