跳转到主要内容
POST
/
gemini
/
video
/
generations
cURL
curl --request POST \
  --url https://api.ttapi.org/gemini/video/generations \
  --header 'Content-Type: application/json' \
  --header 'TT-API-KEY: <api-key>' \
  --data '
{
  "prompt": "A cinematic shot of a futuristic city at sunset",
  "model": "omni-flash",
  "aspect_ratio": "16:9",
  "reference_images": [
    "https://cdn.ttapi.io/example/reference-image.png",
    "https://cdn.ttapi.io/example/reference-video.mp4"
  ],
  "hookUrl": "https://example.com/callback"
}
'
{
  "status": "SUCCESS",
  "message": "success",
  "data": {
    "jobId": "0ccf0606-3f32-4090-85bd-1786e4593be5"
  }
}
视频生成是异步任务。提交成功后会返回 jobId,请通过 视频结果查询 API 获取结果。

授权

TT-API-KEY
string
header
必填

请前往 TTAPI 控制台 获取 API 密钥。

请求体

application/json
prompt
string
必填

视频提示词

示例:

"A cinematic shot of a futuristic city at sunset"

model
enum<string>
默认值:omni-flash
必填

视频模型,当前仅支持 omni-flash

可用选项:
omni-flash
aspect_ratio
enum<string>
必填

视频宽高比

可用选项:
16:9,
9:16
示例:

"16:9"

reference_images
string[]

参考素材 URL 列表,可传图片链接或视频链接;空字符串会被忽略。

示例:
[
"https://cdn.ttapi.io/example/reference-image.png",
"https://cdn.ttapi.io/example/reference-video.mp4"
]
hookUrl
string

任务完成或失败后的回调通知地址

示例:

"https://example.com/callback"

响应

提交成功

status
string
必填

任务状态

示例:

"SUCCESS"

message
string
必填

任务消息

示例:

"success"

data
object
必填
最后修改于 2026年6月5日