Skip to main content
POST
/
videos
/
generations
Video Generation API
curl --request POST \
  --url https://geekai.dev/api/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "cogvideox-flash",
  "prompt": "Peter Rabbit drives his car along the road, his face beaming with joy and delight.",
  "image_url": "https://example.com/image.jpg",
  "async": false,
  "with_audio": false,
  "size": "1920x1080",
  "quality": "speed",
  "duration": 30,
  "fps": 30,
  "retries": 0
}'
{
  "model": "cogvideox-flash",
  "task_id": "bigmodel-video-123456789",
  "task_status": "running",
  "video_result": {
    "url": "<string>",
    "cover_image_url": "<string>",
    "duration": 123,
    "size": 123
  },
  "error": {
    "code": "<string>",
    "message": "<string>"
  }
}
Note: For video model name settings, refer to the System Supported Video Model List, currently supported video generation models are cogvideox-flash (free), cogvideox, and cogvideox-2. The response data format is fully compatible with OpenAI, returning the binary data of the video file.
Different AI platforms support different video sizes for their video generation models. Please refer to the table below for the specific supported sizes:
PlatformModelSupported Sizes
ZhipuCogVideoX Series720x480, 1024x1024, 1280x960, 960x1280, 1920x1080, 1080x1920, 2048x1080, 3840x2160 (By default, the shorter side is 1080, and the longer side is scaled proportionally)

cURL Request Example

    curl --location 'https://geekai.dev/api/v1/videos/generations' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer {YOUR_GEEKAI_API_KEY}' \
    --data '{
        "model":"cogvideox-flash",
        "prompt":"Kittens and puppies are playing in the grass",
        "async": false
    }'

Authorizations

Authorization
string
header
required

token

Body

application/json
model
string
required

video model

Example:

"cogvideox-flash"

prompt
string
required

text prompt

Example:

"Peter Rabbit drives his car along the road, his face beaming with joy and delight."

image_url
string<uri>

image URL path used to generate the video, needs to be publicly accessible, default empty

Example:

"https://example.com/image.jpg"

async
boolean
default:false

enable async mode

Example:

false

with_audio
boolean
default:false

enable audio

Example:

false

size
enum<string>
default:1920x1080

video size

Available options:
720x480,
1024x1024,
1280x960,
960x1280,
1920x1080,
1080x1920,
2048x1080,
3840x2160
quality
string

video quality

Example:

"speed"

duration
enum<integer>
default:30

video duration(seconds)

Available options:
30,
60
fps
enum<integer>
default:30

video frame rate

Available options:
30,
60
retries
integer
default:0

auto retry times, default 0, means no retry

Example:

0

Response

successful response

model
string
required

video model

Example:

"cogvideox-flash"

task_id
string<uuid>
required

task ID

Example:

"bigmodel-video-123456789"

task_status
enum<string>
required

task status

Available options:
pending,
running,
success,
failed
Example:

"running"

video_result
object

video generation result(only returned when successful)

error
object

error information(only returned when failed)

I