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

# Vidu Q4

> Generate a 3–16 second video from one starting frame or reference images, with optional reference audio, at resolutions from 540p to 4k.

<Tip>
  1. After submission, a `task_id` will be returned. If you provided a `callback_url`, when the task status becomes `finished` or `failed`, a POST request will be sent to the `callback_url`.
  2. Regardless of whether `callback_url` is provided, you can retrieve the response result through the unified [Query Task Status](/api-manual/task-management/status) endpoint.
</Tip>

Vidu Q4 animates a starting frame or uses reference images to guide the result. Reference audio can optionally accompany reference images.

## Models

* **vidu-q4** — Image-to-video and reference-to-video generation

## Features

* Generate videos from 3 to 16 seconds long.
* Animate one starting-frame image or guide a video with 1–12 reference images and up to 3 optional reference audio files.
* Choose an output resolution from 540p to 4k.
* Generate an optional audio track in reference-to-video mode.

## Input modes

* **Image-to-video**: Provide exactly one URL in `image_urls`. `prompt` is optional. Do not combine this mode with `reference_image_urls` or `reference_audio_urls`, and do not send `aspect_ratio` or `generate_audio`.
* **Reference-to-video**: Provide `prompt` and 1–12 URLs in `reference_image_urls`. `reference_audio_urls` is optional and must accompany reference images. Do not send `image_urls`.

## Required parameters

* `prompt` (string): Required for reference-to-video. Must contain 1–5,000 characters and cannot be blank.
* `image_urls` (array of strings): Required for image-to-video. Must contain exactly one starting-frame image URL.
* `reference_image_urls` (array of strings): Required for reference-to-video. Must contain 1–12 reference image URLs.

## Optional parameters

* `prompt` (string): Optional for image-to-video, with a maximum of 5,000 characters.
* `reference_audio_urls` (array of strings): Optional audio accompanying `reference_image_urls`, up to 3 files. Each file must be MP3 and 3–12 seconds long. Audio cannot be used without reference images.
* `duration` (integer): Output duration from 3 to 16 seconds. Defaults to `5`.
* `resolution` (string): `540p`, `720p`, `1080p`, `2k`, or `4k`. Defaults to `720p`.
* `aspect_ratio` (string): `16:9`, `9:16`, `4:3`, `3:4`, or `1:1`. Defaults to `16:9`. Available for reference-to-video only.
* `generate_audio` (boolean): Generate an audio track. Defaults to `false`. Available for reference-to-video only.
* `enable_safety_checker` (boolean): Enable content safety checks. Defaults to `true`.

## Examples

The request examples show animation of one starting frame with an optional prompt, and generation guided by reference images with optional audio. Both modes use the same `vidu-q4` model ID.

## Notes

* Put all generation parameters inside `input`.
* Images must use publicly accessible HTTP or HTTPS URLs.
* Reference audio must use publicly accessible HTTP or HTTPS URLs.
* Image-to-video rejects `aspect_ratio` and `generate_audio` even when `generate_audio` is `false`.


## OpenAPI

````yaml api-manual/video-series/vidu-q4.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidu Q4
  description: >-
    Generate video from one starting frame or reference images, with optional
    reference audio.
  version: 1.0.0
servers:
  - url: https://api.poyo.ai
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      summary: Submit a Vidu Q4 video task
      operationId: submit_vidu_q4
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              image-to-video:
                summary: Animate one starting frame
                value:
                  model: vidu-q4
                  input:
                    image_urls:
                      - https://example.com/start-frame.png
              reference-to-video:
                summary: Video guided by reference images and audio
                value:
                  model: vidu-q4
                  input:
                    prompt: >-
                      Animate the character from the reference image with
                      movement guided by the reference audio.
                    reference_image_urls:
                      - https://example.com/character.png
                    reference_audio_urls:
                      - https://example.com/reference.mp3
                    duration: 5
                    resolution: 720p
      responses:
        '200':
          description: Task submitted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - Invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SubmitRequest:
      type: object
      additionalProperties: false
      required:
        - model
        - input
      properties:
        model:
          type: string
          enum:
            - vidu-q4
          description: Public model identifier.
        callback_url:
          type: string
          format: uri
          description: Optional webhook URL for task completion or failure notifications.
        input:
          type: object
          additionalProperties: false
          properties:
            prompt:
              type: string
              maxLength: 5000
              description: >-
                Video instructions, up to 5,000 characters. Required and
                non-empty for reference-to-video; optional for image-to-video.
            image_urls:
              type: array
              items:
                type: string
                format: uri
              minItems: 1
              maxItems: 1
              description: >-
                Exactly one starting-frame image for image-to-video. Cannot be
                combined with reference_image_urls or reference_audio_urls. Use
                publicly accessible HTTP or HTTPS URLs.
            reference_image_urls:
              type: array
              items:
                type: string
                format: uri
              minItems: 1
              maxItems: 12
              description: >-
                Required for reference-to-video. Provide 1-12 reference images.
                Cannot be combined with image_urls. Use publicly accessible HTTP
                or HTTPS URLs.
            reference_audio_urls:
              type: array
              items:
                type: string
                format: uri
              minItems: 1
              maxItems: 3
              description: >-
                Optional reference audio accompanying reference_image_urls.
                Supports up to 3 MP3 files, each 3-12 seconds long. Audio cannot
                be used without reference images. Use publicly accessible HTTP
                or HTTPS URLs.
            duration:
              type: integer
              minimum: 3
              maximum: 16
              default: 5
              description: Output duration in whole seconds.
            resolution:
              type: string
              enum:
                - 540p
                - 720p
                - 1080p
                - 2k
                - 4k
              default: 720p
              description: Output video resolution.
            aspect_ratio:
              type: string
              enum:
                - '16:9'
                - '9:16'
                - '4:3'
                - '3:4'
                - '1:1'
              default: '16:9'
              description: >-
                Output aspect ratio for reference-to-video. Do not send this
                field for image-to-video.
            generate_audio:
              type: boolean
              default: false
              description: >-
                Generate an audio track for reference-to-video. Do not send this
                field for image-to-video.
            enable_safety_checker:
              type: boolean
              default: true
              description: Enable content safety checks.
          description: >-
            Provide one image_urls starting frame, or a prompt with 1-12
            reference_image_urls. Reference audio is optional and requires
            reference images.
          not:
            properties:
              image_urls:
                maxItems: 0
              reference_image_urls:
                maxItems: 0
    SubmitResponse:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          example: 200
        data:
          type: object
          required:
            - task_id
            - status
            - created_time
          properties:
            task_id:
              type: string
              example: task-unified-1792190000-example
            status:
              type: string
              enum:
                - not_started
              example: not_started
            created_time:
              type: string
              format: date-time
              example: '2026-10-17T10:30:00'
    ErrorResponse:
      type: object
      required:
        - code
        - error
      properties:
        code:
          type: integer
          example: 400
        error:
          type: object
          required:
            - message
            - type
          properties:
            message:
              type: string
              example: Invalid request parameters
            type:
              type: string
              example: invalid_request_error
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````

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