> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omniall.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create video

> Create a Vidu Q4 video task.

**Path:** `POST https://api.omniall.ai/v1/video/generations`

**Scenarios:**
- Text-to-video: `prompt` + `seconds` (optional `size` / `resolution`)
- Image / multi-image reference: `reference_image` or `reference_images` / `images` (max 10 total)
- Reference audio: `reference_audios` (max 3; prefer at least one image)

**Constraints:**
- `seconds` / `duration`: integer 4–16 (same price within range)
- `size` / `ratio` / `aspect_ratio`: only `16:9` / `9:16` (default `16:9`)
- `count` must be 1
- Reference videos not supported
- Invalid params → HTTP 400

Auth: `Authorization: Bearer sk-...`



## OpenAPI

````yaml openapi/vidu-video.yaml POST /v1/video/generations
openapi: 3.1.0
info:
  title: Omniall AI — Vidu Video
  version: 1.0.0
  description: >-
    Vidu Q4 async video generation (`vidu-q4-720p` / `vidu-q4-1080p`).


    **Create:** `POST https://api.omniall.ai/v1/video/generations`


    **Get:** `GET https://api.omniall.ai/v1/video/generations/{task_id}`


    Auth: `Authorization: Bearer sk-...`


    | Model | Specs |

    |-------|-------|

    | `vidu-q4-720p` | 720P; duration 4–16 s (same price); 1 clip per request |

    | `vidu-q4-1080p` | 1080P; duration 4–16 s (same price); 1 clip per request
    |


    Per-request billing. Generation often takes a few minutes; poll the get
    endpoint.
servers:
  - url: https://api.omniall.ai
security: []
tags:
  - name: Vidu
    description: Vidu Q4 text-to-video / image-to-video / reference audio
paths:
  /v1/video/generations:
    post:
      tags:
        - Vidu
      summary: Create video
      description: >-
        Create a Vidu Q4 video task.


        **Path:** `POST https://api.omniall.ai/v1/video/generations`


        **Scenarios:**

        - Text-to-video: `prompt` + `seconds` (optional `size` / `resolution`)

        - Image / multi-image reference: `reference_image` or `reference_images`
        / `images` (max 10 total)

        - Reference audio: `reference_audios` (max 3; prefer at least one image)


        **Constraints:**

        - `seconds` / `duration`: integer 4–16 (same price within range)

        - `size` / `ratio` / `aspect_ratio`: only `16:9` / `9:16` (default
        `16:9`)

        - `count` must be 1

        - Reference videos not supported

        - Invalid params → HTTP 400


        Auth: `Authorization: Bearer sk-...`
      operationId: viduCreateVideo
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
            example: Bearer sk-...
          description: Bearer API key, e.g. `Bearer sk-...`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ViduCreateVideoRequest'
            examples:
              vidu_text:
                summary: Text-to-video (vidu-q4-720p · 5s)
                value:
                  model: vidu-q4-720p
                  prompt: An orange cat stretches on a sunny windowsill, slow push-in
                  seconds: 5
                  size: '16:9'
                  count: 1
              vidu_refs:
                summary: Image + audio refs (vidu-q4-1080p · 8s vertical)
                value:
                  model: vidu-q4-1080p
                  prompt: >-
                    The person in the reference image nods gently to the music
                    and smiles
                  seconds: 8
                  size: '9:16'
                  reference_images:
                    - https://example.com/person.jpg
                  reference_audios:
                    - https://example.com/bgm.mp3
      responses:
        '200':
          description: Task accepted (processing)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViduVideoTask'
              example:
                id: task_xxxxxxxx
                task_id: task_xxxxxxxx
                object: video
                model: vidu-q4-720p
                status: processing
                progress: 0
                seconds: '5'
                size: '16:9'
        '400':
          description: Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
components:
  schemas:
    ViduCreateVideoRequest:
      type: object
      required:
        - model
        - prompt
      description: Vidu create-video request body.
      properties:
        model:
          $ref: '#/components/schemas/ViduModel'
        prompt:
          type: string
          description: Video description text.
          example: An orange cat stretches on a sunny windowsill, slow push-in
        seconds:
          oneOf:
            - type: integer
            - type: string
          description: >
            Duration in seconds. Integer 4–16; same price within range.

            If both `duration` and `seconds` are sent, they must match; prefer
            `seconds` only.
          example: 5
        duration:
          oneOf:
            - type: integer
            - type: string
          description: Alias of `seconds`. Prefer sending only `seconds`.
        resolution:
          type: string
          description: Optional; usually implied by model (`720P` / `1080P`).
          enum:
            - 720P
            - 1080P
          example: 720P
        size:
          type: string
          description: >-
            Aspect ratio. Only `16:9` / `9:16`; default `16:9`. Aliases `ratio`
            / `aspect_ratio`.
          enum:
            - '16:9'
            - '9:16'
          default: '16:9'
          example: '16:9'
        ratio:
          type: string
          description: Alias of `size`.
          enum:
            - '16:9'
            - '9:16'
        aspect_ratio:
          type: string
          description: Alias of `size`.
          enum:
            - '16:9'
            - '9:16'
        count:
          type: integer
          description: Clip count. Must be 1.
          enum:
            - 1
          default: 1
          example: 1
        reference_image:
          type: string
          description: >-
            Single reference image URL. Combined with `reference_images` /
            `images` max 10.
          example: https://example.com/1.jpg
        reference_images:
          type: array
          items:
            type: string
          description: >-
            Reference image URL array. Alias `images`. Max 10 with
            `reference_image`. Omit refs for text-to-video.
          maxItems: 10
        images:
          type: array
          items:
            type: string
          description: Alias of `reference_images`.
          maxItems: 10
        reference_audios:
          type: array
          items:
            type: string
          description: >-
            Reference audio URL array. Max 3. Prefer pairing with at least one
            image.
          maxItems: 3
    ViduVideoTask:
      type: object
      description: Vidu video task object.
      properties:
        id:
          type: string
          description: Task id (usually same as `task_id`).
        task_id:
          type: string
          description: Task id.
        object:
          type: string
          description: Object type, usually `video`.
          example: video
        model:
          $ref: '#/components/schemas/ViduModel'
        status:
          type: string
          description: Status such as `processing` / `completed` / `failed`.
          example: processing
        progress:
          type: number
          description: Progress 0–100 when returned.
        seconds:
          oneOf:
            - type: string
            - type: integer
          description: Requested duration.
        size:
          type: string
          description: Aspect ratio.
        resolution:
          type: string
          description: Resolution.
        url:
          type: string
          description: >-
            Result video URL when completed (may also appear as `video_url` /
            `result_url`).
        video_url:
          type: string
          description: Result video URL (compat field).
        result_url:
          type: string
          description: Result video URL (compat field).
        error:
          type: object
          description: Error payload on failure.
          properties:
            message:
              type: string
    OpenAIErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: |
                Example validation messages:
                - duration must be between 4 and 16
                - unsupported aspect ratio; supported: 16:9 / 9:16
                - at most 10 reference images
                - at most 3 reference audios
                - reference videos are not supported
            type:
              type: string
            code:
              type: string
    ViduModel:
      type: string
      description: Vidu Q4 model id (matches Model Square).
      enum:
        - vidu-q4-720p
        - vidu-q4-1080p
      example: vidu-q4-720p

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.