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

# Vidu Q4 Preview (Reference to Video)

> Vidu Q4 Preview **reference-image to video**. Supply 1-15 reference images via `image_urls` and refer to them in the prompt as `@1`, `@2`, … in array order; the model keeps those subjects consistent across the video. Optionally add up to 3 reference audio clips via `ref_audios` to guide voices and dialogue. Output includes a native audio track and goes up to 4K.

This model only accepts `image_urls`. For first-frame image-to-video use [`viduq4_preview`](/api-reference/video-generations/viduq4-preview) — passing `image_url` or `image_end_url` here returns an error.

**Pricing** — per second of generated video, in tokens (USD at $0.02/token):

| resolution | tokens/s | USD/s |
|---|---|---|
| 540p | 2.925 | $0.0585 |
| 720p | 6.175 | $0.1235 |
| 1080p | 7.8 | $0.156 |
| 2K | 12.35 | $0.247 |
| 4K | 25.35 | $0.507 |

The price is the same for both Vidu Q4 Preview models and does not depend on the number of reference images or audio clips, or on `generate_audio`.

Example: an 8s 720p video costs 49.4 tokens (= $0.988).

Returns an `img_uuid`; poll GET /api/v1/jobs/detail (or use `custom_callback_url`) to get the generated video.



## OpenAPI

````yaml api-reference/video-generations/openapi-viduq4-preview-reference.json POST /api/v1/videos/generations
openapi: 3.1.0
info:
  title: GoEnhance API - Vidu Q4 Preview Reference
  description: Reference-image to video with Vidu Q4 Preview.
  version: 1.0.0
servers:
  - url: https://api.goenhance.ai
security: []
paths:
  /api/v1/videos/generations:
    post:
      tags:
        - VideoGenerations
      summary: Vidu Q4 Preview (Reference to Video)
      description: >-
        Vidu Q4 Preview **reference-image to video**. Supply 1-15 reference
        images via `image_urls` and refer to them in the prompt as `@1`, `@2`, …
        in array order; the model keeps those subjects consistent across the
        video. Optionally add up to 3 reference audio clips via `ref_audios` to
        guide voices and dialogue. Output includes a native audio track and goes
        up to 4K.


        This model only accepts `image_urls`. For first-frame image-to-video use
        [`viduq4_preview`](/api-reference/video-generations/viduq4-preview) —
        passing `image_url` or `image_end_url` here returns an error.


        **Pricing** — per second of generated video, in tokens (USD at
        $0.02/token):


        | resolution | tokens/s | USD/s |

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

        | 540p | 2.925 | $0.0585 |

        | 720p | 6.175 | $0.1235 |

        | 1080p | 7.8 | $0.156 |

        | 2K | 12.35 | $0.247 |

        | 4K | 25.35 | $0.507 |


        The price is the same for both Vidu Q4 Preview models and does not
        depend on the number of reference images or audio clips, or on
        `generate_audio`.


        Example: an 8s 720p video costs 49.4 tokens (= $0.988).


        Returns an `img_uuid`; poll GET /api/v1/jobs/detail (or use
        `custom_callback_url`) to get the generated video.
      parameters:
        - name: Authorization
          in: header
          description: ''
          required: false
          example: '{{Authorization}}'
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                  enum:
                    - viduq4_preview_reference
                  description: Model name. Must be `viduq4_preview_reference`.
                prompt:
                  type: string
                  description: >-
                    Text prompt describing the video (required). Refer to
                    reference images as `@1`, `@2`, … in the order of
                    `image_urls`.
                image_urls:
                  type: array
                  items:
                    type: string
                    format: uri
                  minItems: 1
                  maxItems: 15
                  description: >-
                    Reference image URLs (required, 1-15 images). png / jpeg /
                    jpg / webp, max 50MB each.
                ref_audios:
                  type: array
                  items:
                    type: string
                    format: uri
                  maxItems: 3
                  description: >-
                    Optional reference audio URLs (up to 3), e.g. a voice sample
                    or a line of dialogue. Each clip must be an mp3 of 3-12
                    seconds.
                duration:
                  type: integer
                  minimum: 3
                  maximum: 16
                  default: 5
                  description: Video duration in seconds (3-16). Defaults to 5.
                resolution:
                  type: string
                  enum:
                    - 540p
                    - 720p
                    - 1080p
                    - 2K
                    - 4K
                  default: 720p
                  description: >-
                    Output resolution. Case-insensitive (`2k` and `2K` are both
                    accepted).
                ratio:
                  type: string
                  enum:
                    - '16:9'
                    - '9:16'
                    - '1:1'
                    - '4:3'
                    - '3:4'
                  default: '16:9'
                  description: >-
                    Aspect ratio of the output video. `aspect_ratio` is accepted
                    as a compatible alias.
                generate_audio:
                  type: boolean
                  default: true
                  description: >-
                    Whether the output contains a native audio track (dialogue
                    and sound effects). Defaults to `true`. Turning it off does
                    not change the price.
                custom_callback_url:
                  type: string
                  format: uri
                  description: >-
                    Optional. A publicly accessible HTTPS URL. When the task
                    status changes (processing / success / failed), GoEnhance
                    sends a POST request to this URL. The request body is
                    identical to the response of GET /api/v1/jobs/detail. If
                    your server does not respond with HTTP 200, the notification
                    is retried up to 3 times, with a 3-second timeout per
                    attempt.
                  example: https://your-server.com/goenhance/callback
              required:
                - model
                - prompt
                - image_urls
            example:
              model: viduq4_preview_reference
              prompt: >-
                The barista from @1 stands in front of the cafe in @2 and greets
                the camera
              image_urls:
                - https://your-cdn.com/barista.jpg
                - https://your-cdn.com/cafe.jpg
              ref_audios:
                - https://your-cdn.com/greeting.mp3
              duration: 8
              resolution: 720p
              ratio: '9:16'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  msg:
                    type: string
                  data:
                    type: object
                    properties:
                      img_uuid:
                        type: string
                      cost:
                        type: number
                        description: >-
                          Tokens deducted for this request. This is the amount
                          actually charged, so it already reflects any discount
                          active on your account and can be lower than the
                          listed price. Tokens are deducted when the task is
                          accepted, and refunded automatically if the generation
                          ends in failure.
                        example: 30.88
                    required:
                      - img_uuid
                      - cost
                required:
                  - code
                  - msg
                  - data
              examples:
                '1':
                  summary: Success
                  value:
                    code: 0
                    msg: Success
                    data:
                      img_uuid: c12b656c-747a-44fd-9c80-add79b0c52d5
                      cost: 30.88
                '2':
                  summary: Insufficient tokens
                  value:
                    code: 100
                    msg: tokens is not enough
                quota:
                  summary: API key quota exceeded
                  value:
                    code: 101
                    msg: 'API key quota exceeded: 4990 of 5000 tokens used (monthly)'
          headers: {}
        '401':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  msg:
                    type: string
                required:
                  - code
                  - msg
          headers: {}
      deprecated: false
      security: []

````

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