中转API

编辑视频

接口: POST https://tkhub.lol/v1/videos/edits

Grok Imagine 视频编辑,xAI 官方原生 JSON 接口。只支持 grok-imagine-video,1.5 系列和 grok-1.5-video 等渠道别名不支持编辑。提交后返回 request_id,再用 GET /v1/videos/{request_id} 轮询结果。按秒计费,价格以模型广场为准。

参数

  • Content-Type (header, string): 请求体 Content-Type,一般为 application/json
  • Authorization (header, string): Bearer API Key

请求体 (application/json)

  • model (string, 必填): 模型名称:只支持 grok-imagine-video
  • prompt (string, 必填): 编辑指令
  • resolution (string, 必填): 分辨率:480p、720p
  • video (object, 必填): 要编辑的视频
  • aspect_ratio (string): 画面比例:1:1、16:9、9:16、4:3、3:4、3:2、2:3、21:9、5:2。不传时跟随输入视频

请求示例

{
  "model": "grok-imagine-video",
  "prompt": "Give the woman a silver necklace",
  "resolution": "480p",
  "video": {
    "url": "https://example.com/source-video.mp4"
  }
}