AI 模型接口Video generation
创建视频生成任务
提交视频生成任务,支持文生视频和图生视频。
返回任务 ID,可通过 GET 接口查询任务状态。
Authorization
BearerAuth
AuthorizationBearer <token>
使用 Bearer Token 认证。
格式: Authorization: Bearer sk-xxxxxx
In: header
Request Body
application/json
model?string
模型/风格 ID
prompt?string
文本描述提示词
image?string
图片输入 (URL 或 Base64)
duration?number
视频时长(秒)
width?integer
视频宽度
height?integer
视频高度
fps?integer
视频帧率
seed?integer
随机种子
n?integer
生成视频数量
response_format?string
响应格式
user?string
用户标识
metadata?
扩展参数 (如 negative_prompt, style, quality_level 等)
Response Body
application/json
application/json
curl -X POST "https://api.example.com/v1/video/generations" \ -H "Content-Type: application/json" \ -d '{ "model": "kling-v1", "prompt": "宇航员在月球上漫步", "duration": 5, "width": 1280, "height": 720 }'{
"task_id": "abcd1234efgh",
"status": "queued"
}{
"error": {
"message": "string",
"type": "string",
"param": "string",
"code": "string"
}
}这篇文档对您有帮助吗?
最后更新于