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": "<string>",
  "image_tail": "<string>",
  "with_audio": false,
  "size": "720x720",
  "aspect_ratio": "16:9",
  "quality": "speed",
  "duration": 5,
  "fps": 30,
  "async": true,
  "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,
    "revised_prompt": "<string>"
  },
  "error": {
    "code": "<string>",
    "message": "<string>"
  }
}
你可以在模型广场筛选查看系统支持的所有视频模型列表
不同AI平台的视频生成模型支持的视频尺寸不一样,具体支持的尺寸请参考下面的表格:
平台模型支持的尺寸
OpenAISora480x480、480x854、854x480、720x720、720x1280、1280x720、1080x1080、1080x1920、1920x1080, 不同尺寸不同时长视频生成价格可能不同
GoogleVeo系列无尺寸配置,支持宽高比:16:9(默认值)、9:16,参考图片仅支持 jpg/png 格式,Veo3支持生成音频。
智谱清言CogVideoX系列720x480、1024x1024、1280x960、960x1280、1920x1080、 1080x1920、2048x1080、3840x216,默认短边是1080,长边按比例缩放
可灵AIkling系列无尺寸配置,支持宽高比: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.