---
title: "POST /paas/v4/videos/generations"
method: POST
path: "/paas/v4/videos/generations"
---

# POST /paas/v4/videos/generations

`POST /paas/v4/videos/generations`

## Request

- Base URL: `https://api.z.ai/api`
- URL: `https://api.z.ai/api/paas/v4/videos/generations`
- Auth: HTTP bearer

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.

## Headers

- `Accept-Language` 'en-US,en': Config desired response language for HTTP requests.

## Request body

- CogVideoX3Request
  - `model` 'cogvideox-3', required: The model code to be called.
  - `prompt` string: Text description of the video, maximum input length of 512 characters. Either image_url or prompt must be provided, or both.
  - `quality` 'speed' | 'quality': Output mode, default is `speed`. - `quality`: Prioritizes quality, higher generation quality. - `speed`: Prioritizes speed, faster generation time, relatively lower quality.
  - `with_audio` boolean: Whether to generate AI sound effects. Default: `false` (no sound effects).
  - `image_url` union[]: 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
    - union
      - string, uri
      - string, byte
  - `size` '1280x720' | '720x1280' | '1024x1024' | '1920x1080' | '1080x1920' | '2048x1080' | '3840x2160': 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. Resolution options: "1280x720", "720x1280", "1024x1024", "1080x1920", "2048x1080", "3840x2160"
  - `fps` 30 | 60: Video frame rate (FPS), optional values are `30` or `60`. Default: `30`.
  - `duration` 5 | 10: Video duration, default is 5 seconds, supports `5` and `10` seconds.
  - `request_id` string: Passed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default.
  - `user_id` string: 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.

## Response `200`

Processing successful.

- VideoResponse
  - `model` string: Model name used in this call.
  - `id` string: Task order number generated by the Z.AI, use this order number when calling the request result interface.
  - `request_id` string: Task number submitted by the user during the client request or generated by the platform.
  - `task_status` string: Processing status, `PROCESSING (processing)`,` SUCCESS (success)`, `FAIL (failure)`. Results need to be obtained via query.

## Other responses

- `default`: The request has failed.

## Changes

> 10 revisions in range; 1 not diffed.

- **2026-05-15** `4033afc58a52`: 5 breaking, 5 warning
  - the `oneOf[subschema #1: CogVideoX-3]/allOf[#/components/schemas/VideoCommonRequest]/request_id` request property's minLength was increased from `0` to `6`
  - the `oneOf[subschema #2: Vidu: Text to Video]/allOf[#/components/schemas/VideoCommonRequest]/request_id` request property's minLength was increased from `0` to `6`
  - the `oneOf[subschema #3: Vidu: Image to Video]/allOf[#/components/schemas/VideoCommonRequest]/request_id` request property's minLength was increased from `0` to `6`
  - the `oneOf[subschema #4: Vidu: First & Last Frame to Video]/allOf[#/components/schemas/VideoCommonRequest]/request_id` request property's minLength was increased from `0` to `6`
  - …6 more

[Operation history](https://skmtc.dev/z/apis/z-ai-api/changes/paas/v4/videos/generations/post.md)

---

[API](https://skmtc.dev/z/apis/z-ai-api.md) - [All operations](https://skmtc.dev/z/apis/z-ai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/z/apis/z-ai-api/revisions/79eaab7f193b?raw)
