Skip to main content
POST
创建视频
需要工作区的预览功能访问权限。有关设置、Webhook 和结果处理,请参阅视频与批处理任务。

授权

Authorization
string
header
必填

Bearer 令牌身份验证

请求体

application/json
model
string
必填
prompt
string
必填
duration
integer

所需时长(秒),取决于提供商/模型。

input_video_duration
number<double>

源视频时长(秒)。提供商对源视频时长与生成输出分别计费时必填。

必填范围: 0 < x <= 3600
input_audio_duration
number<double>

声明的源音频时长(秒),用于验证提供商允许的范围。不报告权威使用量的提供商可能按其支持的输入时长上限计费。

必填范围: 2 <= x <= 20
size
string

明确尺寸(例如1280x720)。不能与resolution或aspect_ratio组合使用。

resolution
string

480p、720p、1080p、1K、2K、4K。可与aspect_ratio组合使用。不能与size组合使用。

aspect_ratio
string

宽高比,如16:9、9:16、1:1。可与resolution组合使用。不能与size组合使用。

seed
integer
sample_count
integer
必填范围: 1 <= x <= 4
negative_prompt
string
generate_audio
boolean
enhance_prompt
boolean
compression_quality
integer
person_generation
string
resize_mode
string
input_references
object[]

用于控制生成的HTTPS图像、音频或视频输入。支持的类型、角色、数量和组合取决于所选模型。提交任务前请检查GET /videos/models。此架构中省略的单数兼容别名input_reference接受multipart图像,或恰好包含file_id或image_url其中一个的对象。支持情况取决于提供商。

带类型的HTTPS媒体输入。图像使用image_url,音频或视频使用media_url。角色描述模型应如何使用输入;支持情况因提供商和模型而异。

frame_images
object[]

首帧/尾帧的HTTPS图像。每个frame_type只能出现一次。不要同时提供input_reference或input_references中的帧角色。

Required array length: 1 - 2 elements
provider_params
object

仅限提供商特定扩展。完整请求透传以及重复的路由、提示词、回调或计费字段会被拒绝。

provider_options
object

以规范提供商ID(如atlascloud或byteplus)为键的扩展。仅转发所选提供商的选项。不能与provider_params组合使用。路由、提示词、回调、时长、分辨率和输出数量必须使用经过验证的顶层字段。

output
object
webhook
object
provider
object

用于网关选择的提供商路由偏好设置。

响应

202 - application/json

视频响应

id
string
polling_url
string
websocket_url
string<uri>

用于订阅标准化异步任务生命周期更新的WebSocket URL。

model
string
request_id
string
session_id
string
status
enum<string>
可用选项:
queued,
processing,
completed,
failed,
cancelled,
expired
lifecycle_status
enum<string>

供轮询、WebSocket和Webhook使用方使用的标准化异步生命周期状态。

可用选项:
pending,
running,
completed,
failed,
cancelled,
expired
cancel_url
string<uri> | null

为兼容性保留;目前始终为null。

output_access
enum<string>
可用选项:
bytes,
signed_url,
both
generation_id
string | null
native_video_id
string | null

与网关自有ID不同时的提供商原生视频/任务ID。

created_at
started_at
completed_at
object
string
示例:

"video"

poll_after_seconds
integer
示例:

20

provider
string
seconds
number
size
string
audio
boolean
content_url
string

当output_access包含bytes时存在(需认证的端点)。

download_url
string | null

状态为completed时用于直接下载的第一方签名URL。

expires_at
integer | null

签名download_url过期的Unix时间戳(秒)。

progress
integer | null
progress_source
string
asset
object | null
outputs
object[]
billing
object
webhook
object

已清理的异步Webhook配置及投递状态。绝不返回密钥;has_secret表示是否启用签名投递。签名投递包含x-phaseo-signature、x-phaseo-timestamp、x-phaseo-event-id、x-phaseo-event-type、x-phaseo-delivery-key、x-phaseo-attempt和x-phaseo-max-attempts请求头。

next_webhook_retry_at
string | null

下一次计划用户Webhook重试的ISO时间戳(如已排队)。

last_webhook_progress
number | null

最近向Webhook使用方发送的粗略进度区间。

last_webhook_progress_at
string | null

最近一次Webhook进度区间发送的ISO时间戳。

last_webhook_dispatched_at
string | null

最近一次Webhook发送尝试的ISO时间戳。

usage
object
error
unknown
最后修改于 2026年10月2日