Z.ai API
Z.ai API
Tool
zai_generate_videoasync
CogVideoX is a video generation large model developed by Z.AI, equipped with powerful video generation capabilities. Simply inputting text or images allows for effortless video creation. Vidu: A high-performance video large model that combines high consistency and high dynamism, with precise semantic understanding and exceptional reasoning speed.
Pricing
Per call
$0.02
Model
flat
Pay only for what you use. No subscriptions.
Inputs
duration
integerwith_audio
booleansize
stringuser_id
stringimage_url
arrayfps
integermodel *
stringprompt
stringrequest_id
stringquality
stringTry It
API
MCP Config
Input Parameters
Video duration, default is 5 seconds, supports `5` and `10` seconds.
Default value: if not specified, the short side of the generated video is 1080 by default, and the long side is determined according to the original image ratio. Maximum support for 4K resolution.
Unique ID of the end-user, assists the platform in intervening in end-user violations, generating illegal or inappropriate information, or other abusive behaviors. ID length requirement: minimum `6` characters, maximum `128` characters.
Provide an image based on which content will be generated. If this parameter is passed, the system will operate based on this image. Supports passing images via URL or Base64 encoding. Image requirements: images support `.png`, `.jpeg`, `.jpg` formats; image size: no more than `5M`. Either image_url and prompt can be used, or both can be passed simultaneously. First and last frames: supports inputting two images. The first uploaded image is regarded as the first frame, and the second image is regarded as the last frame. The model will generate the video based on the images passed in this parameter. First and last frame mode only supports `speed` mode
Video frame rate (FPS), optional values are `30` or `60`. Default: `30`.
The model code to be called. Available options: `cogvideox-3`
Text description of the video, maximum input length of 512 characters. Either image_url or prompt must be provided, or both.
Provided by the client, must be unique; used to distinguish each request’s unique identifier. If not provided by the client, the platform will generate one by default.
Output mode, default is `speed`.
* `quality`: Prioritizes quality, higher generation quality.
* `speed`: Prioritizes speed, faster generation time, relatively lower quality.

