跳转到正文
使用文档

搜索文档

搜索只在此浏览器中进行,关键词不发送、不保存。请勿粘贴凭据。

正在加载公开搜索索引…

Tab 或方向键选择 · Enter 打开 · Esc 关闭
浏览文档目录

共享字段与数据结构

从后端源码生成共享字段、嵌套类型、默认值、必填项与约束,避免在文档中维护第二份参数定义。

公开测试API v1 · 1.4.0最后核实
本页目录

“—”表示没有声明默认值,不等于 null。字段在 JSON Schema 中可选,仍可能受工作流的条件必填限制。模型专属选项仍需查询实时能力。

AccountAPIKey

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
id string 是 — format: uuid 当前 Key 的标识,不是密钥明文;幂等去重受此身份约束。
scopes array<string> 是 — — 当前 Key 获得的权限。

AccountLimits

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
concurrency integer 是 — — 整个账户的最大并发任务数。
create_per_minute integer 是 — — 账户每分钟创建请求限额。
other_per_minute integer 是 — — 账户每分钟其他请求限额。
queue integer 是 — — 整个账户的最大排队任务数。

AccountPlan

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
cancel_at_period_end boolean 是 — — 当前付费订阅是否停止续订;注册基础档为 false。
code string 是 — — 当前开发者访问档位:registered、basic、expert 或 ultra。
current_period_end string / null 是 — format: date-time 付费订阅周期的 UTC 结束时间;注册基础档为 null。

AccountResponse

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
api_key AccountAPIKey 是 — — 当前 Key 标识及权限,不返回密钥明文。
id string 是 — format: uuid 当前鉴权账户 ID。
limits AccountLimits 是 — — 所有 Key 共用的账户级限额。
object string 否 "account" const: "account" —
plan AccountPlan 是 — — 当前开发者访问档位及可选订阅周期。

AnimationCreateRequest

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
export ExportOptions 否 {"fps":null,"frame_count":24,"output_formats":["spritesheet"],"output_height":512,"output_width":512,"transparent":{"enabled":false},"unity":{"pivot":"bottom_center","pixels_per_unit":100}} — 视频生成后执行导出;带 Alpha 的格式要求 alpha_key 来源,适配格式会自动启用其透明处理。
input GenerationInput 是 — — 调用方所属或本次提供的生成图片。
metadata object 否 {} — 调用方元数据,仅字符串、数字、布尔或 null;JSON 不超过 4 KiB,不存凭据。
negative_prompt string 否 "" maxLength: 4000 可选负向提示词,仅适用于支持的模型。
prompt string 否 "" maxLength: 8000 动作提示词;模型要求时不能为空,私有提示词不得写入日志。
selection Selection 否 {"duration_seconds":null,"mode":"full","start_seconds":0} — 生成后选取的区间,默认完整视频。
video VideoOptions 否 {"duration_seconds":null,"input_canvas":null,"model":null,"ratio":null,"resolution":null,"seed":null,"style_preset":null,"transparency":{"key_color":null,"key_selection":"auto","mode":"standard"},"watermark":null} — 符合模型能力的生成设置。

AnimationExportCreateRequest

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
export ExportOptions 否 {"fps":null,"frame_count":24,"output_formats":["spritesheet"],"output_height":512,"output_width":512,"transparent":{"enabled":false},"unity":{"pivot":"bottom_center","pixels_per_unit":100}} — 输出格式及处理设置。
metadata object 否 {} — 简单标量或 null 元数据,JSON 不超过 4 KiB,不包含凭据。
selection Selection 否 {"duration_seconds":null,"mode":"full","start_seconds":0} — 需要导出的源视频区间。
source_video_asset_id string 是 — format: uuid 所属源视频资产 ID,不是任务 ID;复用已有视频可避免重新生成动作。

APIError

字段 类型 必填 默认值 约束 含义
code string 是 — — 稳定的程序错误码。
details object 是 — — 特定错误的公开详情,检查时不记录私有输入。
message string 是 — — 人类可读说明,不依赖精确文本分支。
param string / null 否 — — 已知时指向相关公开参数。
request_id string / null 是 — — 供支持关联排查的公共请求 ID,不是凭据。
retryable boolean 是 — — 重试可能有帮助,但仍需保持幂等并遵循 Retry-After。

APIErrorEnvelope

字段 类型 必填 默认值 约束 含义
error APIError 是 — — —

AssetResponse

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
byte_size integer 是 — — 文件预期字节数。
created_at string 是 — format: date-time UTC 创建时间。
download_expires_at string 是 — format: date-time 签名 URL 的 UTC 过期时间;过期后重新查询资产。
download_url string 是 — — 敏感短期签名 URL;下载及跳转时均不携带 Bearer 头,不记录此 URL。
format string 是 — — 实际资产格式,不要依赖 outputs 固定顺序。
id string 是 — format: uuid 稳定公共资产 ID,用于刷新下载信息。
media MediaResponse / null 否 null — 白名单内的实测视频信息,未知字段为 null;非视频资产为 null。
mime_type string 是 — — 资产媒体类型。
object string 否 "asset" const: "asset" —

Base64ImageInput

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
data string 是 — minLength: 4 纯 Base64,不含 data URL 前缀;解码后单张 10 MiB、合计 20 MiB。
media_type string 是 — enum: "image/png", "image/jpeg", "image/webp" 图片实际 MIME 类型。
type string 是 — const: "base64" —

Body_create_file_v1_files_post

字段 类型 必填 默认值 约束 含义
file string 是 — format: binary PNG、JPEG 或 WebP 图片字节,校验后返回公共文件 ID。

CreditsBalanceResponse

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
available integer 是 — — 当前账户可用积分,不代表功能权益已解锁。
object string 否 "credit_balance" const: "credit_balance" —

CreditUsage

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
charged integer 是 — — 最终净扣费积分。供应商明确审核拒绝会退分,取消本身不代表退款。
held integer 是 — — 当前预占积分,不应与 charged 相加当作扣费。
quoted integer 是 — — 报价总额,不一定等于最终扣费。
refunded integer 否 0 — 扣费后退回的积分,已从 charged 中扣除,不是现金退款。
released integer 否 0 — 尚未确认扣费即释放的积分。
status string / null 否 null — 积分状态:held、charged、released、refunded,内部子任务可为 managed。

ExportOptions

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
fps number / null 否 null maximum: 60; exclusiveMinimum: 0 按源视频原速采样,不补帧;仅用于独立导出,需 spritesheet 和 spritesheet_json;短尾帧保留选区总时长。
frame_count integer / null 否 null minimum: 1; maximum: 240 旧版等间隔帧数,与 fps 互斥;两者均省略时使用 24 帧。
output_formats array<string> 否 ["spritesheet"] minItems: 1; 元素:enum: "clip_video", "webm_alpha", "prores_4444", "gif", "frames_zip", "spritesheet", "spritesheet_json", "unity_meta", "unity_pack", "godot_pack", "unreal_paper2d_pack", "cocos_creator_pack", "construct3_pack" 请求的资产格式;帧数模式默认 spritesheet,FPS 模式默认 spritesheet 加 spritesheet_json。重复项会去重,元数据需配套纹理。
output_height integer 否 512 minimum: 64; maximum: 1024 输出帧高度,单位像素。
output_width integer 否 512 minimum: 64; maximum: 1024 输出帧宽度,单位像素。
transparent ExportTransparency 否 {"enabled":false} — 使用 enabled 对象形式;兼容布尔值输入并规范化为此对象。
unity UnityOptions 否 {"pivot":"bottom_center","pixels_per_unit":100} — Unity 专用元数据和资源包设置。

ExportTransparency

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
enabled boolean 否 false — 为兼容输出启用透明处理;要求 alpha_key 来源,不会让 MP4 透明。

ExportWarning

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
code string 是 — — —
details object 否 {} — —
message string 是 — — —

FileImageInput

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
file_id string 是 — format: uuid POST /files 或 complete_image_upload 返回的所属公共文件 ID,不是 Studio uploadId。
type string 是 — const: "file" —

FileResponse

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
byte_size integer 是 — — 存储图片字节数。
created_at string 是 — format: date-time 上传创建的 UTC 时间。
height integer 是 — — 解码后图片高度,像素。
id string 是 — format: uuid type=file 输入使用的可复用公共文件 ID。
mime_type string 是 — — 校验后的图片媒体类型。
object string 否 "file" const: "file" —
sha256 string 是 — — 图片字节的 SHA-256。
width integer 是 — — 解码后图片宽度,像素。

GenerationInput

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
first_frame FileImageInput / Base64ImageInput / UrlImageInput 是 — discriminator: type 必需首帧,用 type 选择图片传入方式。
last_frame FileImageInput / Base64ImageInput / UrlImageInput / null 否 null discriminator: type 可选尾帧,所选模型必须支持首尾帧模式。
reference_images array<FileImageInput / Base64ImageInput / UrlImageInput> 否 [] maxItems: 8; 元素:discriminator: type 额外参考图,不含首帧;实时模型可能有更低上限。

GenerationTransparency

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
key_color string / null 否 null — 手动选择时使用的临时键色;通常保留自动选择。
key_selection string 否 "auto" enum: "auto", "manual" 临时键色的选择方式。
mode string 否 "standard" enum: "standard", "alpha_key" standard 保留场景;alpha_key 要求所有参与图片有有效 Alpha,原始视频仍不透明。

InputCanvasOptions

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
aspect_ratio string 否 "follow_output" enum: "follow_output", "source" 跟随输出比例或保持原图比例。
background string 否 "auto" enum: "auto", "transparent", "solid" 画布扩展区域的背景策略。
background_color string / null 否 null pattern: ^#[0-9A-Fa-f]{6}$ 纯色扩展区域的六位 RGB 颜色。
enabled boolean 否 true — 是否准备扩展输入画布。
position_x number 否 0.5 minimum: 0; maximum: 1 归一化水平位置。
position_y number 否 0.5 minimum: 0; maximum: 1 归一化垂直位置。
source_scale number 否 0.8 minimum: 0.5; maximum: 1 原图主体在画布中的缩放比例。

MediaResponse

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
duration_seconds number / null 否 null — 根据呈现时间戳测得的可播放视频时长,不使用供应商请求时长。
fps number / null 否 null — 实测源平均帧率;可变帧率选帧仍依据呈现时间戳。
frame_count integer / null 否 null — 解码源帧数,未知为 null。
height integer / null 否 null — 考虑旋转后的显示高度,单位像素。
width integer / null 否 null — 考虑旋转后的显示宽度,单位像素。

ModelCapabilities

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
aspect_ratio_mode string 是 — — 供应商对画幅比例的处理模式。
default_duration_seconds integer 是 — — 默认生成时长,秒。
default_ratio string / null 是 — — 默认比例,不适用时为 null。
default_resolution string / null 是 — — 默认分辨率,不适用时为 null。
durations array<integer> 是 — — 支持的生成秒数,同时检查分辨率专属限制。
durations_by_resolution object 否 {} — 各分辨率支持的时长秒数。
id string 是 — — 请求使用的 provider:model 标识,以实时目录为准。
label string 是 — — 人类可读模型名称。
max_reference_images integer 是 — — 模型参考图容量;参考图模式中首帧占第一个参考图槽位。
model string 是 — — 供应商内的模型标识。
modes array<string> 是 — — 支持的输入模式,如 first_frame、first_last_frame、reference_images。
provider string 是 — — 公开供应商标识。
ratios array<string> 是 — — 支持的比例;存在 ratios_by_mode 时同时检查。
ratios_by_mode object 否 {} — 各输入模式支持的比例。
reference_image_duration_seconds integer / null 是 — — 参考图模式有固定限制时要求的秒数。
requires_prompt boolean 是 — — 是否要求提示词非空。
resolutions array<string> 是 — — 支持的分辨率选项。
returns_last_frame boolean 是 — — 模型是否可返回末帧资产。
supports_first_frame boolean 是 — — 是否支持首帧输入。
supports_last_frame boolean 是 — — 是否支持尾帧输入。
supports_negative_prompt boolean 是 — — 是否支持负向提示词。
supports_reference_images boolean 是 — — 是否支持参考图模式。
supports_seed boolean 是 — — 是否支持 seed。
supports_watermark boolean 是 — — 是否支持水印设置。

ModelsResponse

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
data array<ModelCapabilities> 是 — — 当前启用的模型,客户端不要写死此清单。
object string 否 "list" const: "list" —

PreviewCell

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
index integer 是 — minimum: 0 原始时间点请求中的位置,从 0 开始。
rect PreviewRect 是 — — 联系表中的图像区域,不包含时间标签。
requested_time_seconds number 是 — — 相对源视频可播放起点的请求时间。
source_time_seconds number 是 — — 请求时间正在显示的源帧的呈现时间。

PreviewRect

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
height integer 是 — exclusiveMinimum: 0 缩略图高度,不含留白及标签。
width integer 是 — exclusiveMinimum: 0 缩略图宽度,不含留白及标签。
x integer 是 — minimum: 0 相对联系表左上角的横向像素坐标。
y integer 是 — minimum: 0 相对联系表左上角的纵向像素坐标。

QuoteResponse

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
breakdown object 否 {} — 公开费用组成,以 credits 为报价总额。
credits integer 是 — — 当前预计积分,不锁价也不构成支出授权;创建时会重新报价。
object string 否 "quote" const: "quote" —
resolved_export ResolvedExport / null 否 null — 已有来源的 FPS 导出采样摘要;旧版或生成报价为 null。

ResolvedExport

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
duration_ms integer 是 — — Manifest 逐帧时长的毫秒总和。
fps number 是 — — 目标采样频率,不按帧数除以时长重新计算。
frame_count integer 是 — — 严格位于选区终点前的采样帧数。
selection Selection 是 — — 实际源区间,full 使用实测可播放时长。
warnings array<ExportWarning> 否 [] — 采样警告,包含未补帧而重复采到源帧的情况。

Selection

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
duration_seconds number / null 否 null exclusiveMinimum: 0 mode=range 时必填,选段时长秒数必须为正。
mode string 否 "full" enum: "full", "range" full 使用完整来源;range 必须提供 duration_seconds。
start_seconds number 否 0 minimum: 0 相对源视频起点的选段开始秒数。

TaskError

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
code string 是 — — 供程序识别的任务错误码。
details object 否 {} — 公开错误详情,不含私有存储或供应商值。
message string 是 — — 人类可读说明,不应作为稳定分支条件。
param string / null 否 null — 可用时提供相关公开参数。
retryable boolean 否 false — 重试是否可能有帮助;新建付费任务前先检查部分产物。

TaskListResponse

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
data array<TaskResponse> 是 — — 当前页中归属自己的任务。
next_cursor string / null 否 null — 不透明的下一页游标,null 表示无下一页,使用时原样传回。
object string 否 "list" const: "list" —

TaskResponse

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
created_at string 是 — format: date-time 任务被接受的 UTC 时间。
credits CreditUsage 是 — — 报价、预占及已扣积分状态。
error TaskError / null 否 null — 任务失败信息,与是否存在可用产物分别判断。
finished_at string / null 否 null format: date-time 已知时返回 UTC 终态时间。
id string 是 — format: uuid 创建后立即保存任务 ID,通过它轮询,不要再次创建。
metadata object 否 {} — 调用方提供的元数据。
normalized_input object 否 {} — 规范化公共输入,可能含私有提示词或图片引用,不要整体写入日志。
object string 是 — enum: "video_generation", "animation_export", "animation" 公共任务资源类型。
outputs array<AssetResponse> 否 [] — 可用资产,失败或取消也可能有部分产物;所有终态都应检查。
progress number 是 — minimum: 0; maximum: 1 0 至 1 的进度值,不代表精确完成时间。
resolved_export ResolvedExport / null 否 null — 持久化的 FPS 采样摘要,与报价、Manifest 一致;历史任务为 null。
stage string / null 否 null enum: "queued", "video_generation", "animation_export", "completed" 可用时显示当前流水线阶段。
started_at string / null 否 null format: date-time 已知时返回 UTC 生产开始时间。
status string 是 — enum: "queued", "running", "cancelling", "succeeded", "failed", "cancelled" succeeded、failed、cancelled 为终态;cancelling 不是终态。

UnityOptions

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
pivot string 否 "bottom_center" const: "bottom_center" 支持的 Unity 精灵锚点。
pixels_per_unit integer 否 100 minimum: 1; maximum: 1000 Unity 每世界单位对应的纹理像素数。

UrlImageInput

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
type string 是 — const: "url" —
url string 是 — minLength: 9; maxLength: 2048 公开 HTTPS 图片,443 端口,不带凭据或 fragment;禁止私网和不安全跳转,重试期间保持图片字节稳定。

VideoGenerationCreateRequest

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
input GenerationInput 是 — — 调用方所属或本次提供的生成图片。
metadata object 否 {} — 调用方元数据,仅字符串、数字、布尔或 null;JSON 不超过 4 KiB,不存凭据。
negative_prompt string 否 "" maxLength: 4000 可选负向提示词,仅适用于支持的模型。
prompt string 否 "" maxLength: 8000 动作提示词;模型要求时不能为空,私有提示词不得写入日志。
video VideoOptions 否 {"duration_seconds":null,"input_canvas":null,"model":null,"ratio":null,"resolution":null,"seed":null,"style_preset":null,"transparency":{"key_color":null,"key_selection":"auto","mode":"standard"},"watermark":null} — 符合模型能力的生成设置。

VideoGenerationQuoteRequest

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
has_last_frame boolean 否 false — 计划请求是否包含尾帧。
reference_image_count integer 否 0 minimum: 0; maximum: 8 额外参考图数量,不含首帧。
video VideoOptions 否 {"duration_seconds":null,"input_canvas":null,"model":null,"ratio":null,"resolution":null,"seed":null,"style_preset":null,"transparency":{"key_color":null,"key_selection":"auto","mode":"standard"},"watermark":null} — 拟报价的生成选项,应与后续创建一致。

VideoOptions

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
duration_seconds number / null 否 null exclusiveMinimum: 0 秒数,需符合模型与分辨率支持范围;省略时使用模型默认值。
input_canvas InputCanvasOptions / null 否 null — 可选输入画布设置;省略时保持来源构图。
model string / null 否 null — GET /models 返回的 provider:model ID;省略时使用配置的默认模型。
ratio string / null 否 null — 当前模型与输入模式支持的画幅比例。
resolution string / null 否 null — 实时模型目录中的分辨率值。
seed integer / null 否 null minimum: 0; maximum: 2147483647 仅适用于声明支持 seed 的模型,不保证所有输出确定性。
style_preset string / null 否 null — 所选供应商或模型支持的可选风格预设。
transparency GenerationTransparency 否 {"key_color":null,"key_selection":"auto","mode":"standard"} — 来源透明流程;透明导出要求 alpha_key。
watermark boolean / null 否 null — 可选水印设置,需检查模型能力。

VideoPreviewRequest

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
max_frame_size integer 否 256 minimum: 32; maximum: 512 缩略图最长边像素数,保持宽高比。
timestamps_seconds array<number> 是 — minItems: 1; maxItems: 12; 元素:minimum: 0 按请求顺序提供源时间点,每个点严格小于可播放终点,最多 12 个。

VideoPreviewResponse

禁止未声明的字段。

字段 类型 必填 默认值 约束 含义
cells array<PreviewCell> 是 — — 按请求顺序排列的缩略图,保留重复时间点。
height integer 是 — — 联系表高度,包含标签及留白,单位像素。
image AssetResponse 是 — — 缓存的 PNG 联系表,提供可刷新的签名下载地址。
object string 否 "video_preview" const: "video_preview" —
source_video_asset_id string 是 — format: uuid 稳定的源视频资产 ID。
width integer 是 — — 联系表宽度,包含标签及留白,单位像素。

这篇文档有帮助吗?

不收集搜索词、代码或自由文本。此开关只控制文档交互事件;站点通用分析仍遵循隐私政策。 隐私政策

需要帮助?联系支持