POST
/
videos
/
generations
curl --request POST \
  --url https://geekai.co/api/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "cogvideox-flash",
  "prompt": "彼得兔开小汽车,游走在马路上,脸上的表情充满开心喜悦",
  "negative_prompt": "<string>",
  "image_url": "<string>",
  "async": false,
  "with_audio": false,
  "size": "1920x1080",
  "quality": "speed",
  "duration": 5,
  "fps": 30,
  "retries": 0
}'
{
  "model": "cogvideox-flash",
  "task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "task_status": "running",
  "video_result": {
    "url": "<string>",
    "cover_image_url": "<string>",
    "duration": 123,
    "size": 123
  },
  "error": {
    "code": "<string>",
    "message": "<string>"
  }
}

你可以在模型广场筛选查看系统支持的所有视频模型列表

不同AI平台的视频生成模型支持的视频尺寸不一样,具体支持的尺寸请参考下面的表格:

平台模型支持的尺寸
智谱清言CogVideoX系列

720x480、1024x1024、1280x960、960x1280、1920x1080、 1080x1920、2048x1080、3840x216,默认短边是1080,长边按比例缩放

可灵AIkling-v1系列

无尺寸配置,支持宽高比:16:9、9:16、1:1, 默认值:16:9

StabilityStable Video系列

无尺寸配置,仅支持图生视频,因此对图片尺寸有要求,限定为以下几种尺寸(单位:像素): 1024x576、576x1024、768x768,参考图片仅支持 jpg/png 格式。

视频模型 API 调用示例可以参考这里:生成视频

请求/响应参数明细

Authorizations

Authorization
string
header
required

JWT认证token

Body

application/json

Response

200
application/json

成功响应

The response is of type object.