Skip to main content
POST /v1/videos 提供 model、prompt,可选模型支持的 seconds、size 和参考图片。JSON 与 multipart 由执行插件解释;文件上传使用 multipart 的 input_reference。 当前宿主返回 HTTP 200 和公开任务 id,不表示生成完成。保存 ID 并查询状态;不要在轮询时再次 POST。公开协议保留不等于上游可用,尤其不能假定已停用的 OpenAI Sora 服务仍在线。 完整接入指南与可执行示例 Read in English

授权

Authorization
string
header
必填

模型调用 API Key,不是控制台登录凭据 / Model API key, not console login credentials

请求体

model
string
必填

当前密钥可用且支持此接口的模型 ID / Model ID available to the key and supporting this endpoint

示例:

"YOUR_MODEL_ID"

prompt
string
必填

任务描述;遵循模型的长度和内容要求 / Task description; follow model length and content requirements

seconds
string

请求时长,单位秒;使用插件和模型允许的值,不以宿主安全上限作为模型能力 / Duration in seconds; use plugin/model values, not the host safety ceiling

示例:

"4"

size
string

模型支持的宽x高 / Model-supported widthxheight

示例:

"1280x720"

input_reference
file

可选参考图片文件,格式与尺寸需模型支持 / Optional reference image file; format and dimensions must be supported

响应

接受任务,不代表生成完成 / Task accepted, not necessarily completed

id
string
必填

网关公开任务 ID,后续查询/下载使用此值 / Public gateway task ID; use for retrieval/download

示例:

"task_example"

object
string
必填
示例:

"video"

model
string
必填

当前密钥可用且支持此接口的模型 ID / Model ID available to the key and supporting this endpoint

示例:

"YOUR_MODEL_ID"

status
enum<string>
必填

以状态判断完成;unknown 必须单独处理 / Determine completion from status; handle unknown separately

可用选项:
queued,
in_progress,
completed,
failed,
unknown
progress
integer
必填

进度提示,不等同于完成保证 / Progress hint, not proof of completion

created_at
integer
必填

Unix 秒 / Unix seconds

completed_at
integer

完成时间,可省略 / Completion timestamp; may be omitted

expires_at
integer

渠道可能提供的过期时间 / Optional expiry from channel

seconds
string
size
string
error
object
metadata
object