> ## 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.

# MAGI-2 Reference to Video

> Generate video from one or more reference images, videos, or audio clips.

**Pricing**

| Resolution | Tokens per requested second | USD per requested second |
|---|---:|---:|
| 1080p | 5.2 | $0.104 |

References and synchronized audio have no additional charge. The response contains an `img_uuid`. Poll `GET /api/v1/jobs/detail` or supply `custom_callback_url` for task updates.



## OpenAPI

````yaml api-reference/video-generations/openapi-magi-2-refs.json POST /api/v1/videos/generations
openapi: 3.1.0
info:
  title: GoEnhance API - MAGI-2 Reference to Video
  description: Generate video from one or more reference images, videos, or audio clips.
  version: 1.0.0
servers:
  - url: https://api.goenhance.ai
security: []
paths:
  /api/v1/videos/generations:
    post:
      tags:
        - VideoGenerations
      summary: MAGI-2 Reference to Video
      description: >-
        Generate video from one or more reference images, videos, or audio
        clips.


        **Pricing**


        | Resolution | Tokens per requested second | USD per requested second |

        |---|---:|---:|

        | 1080p | 5.2 | $0.104 |


        References and synchronized audio have no additional charge. The
        response contains an `img_uuid`. Poll `GET /api/v1/jobs/detail` or
        supply `custom_callback_url` for task updates.
      parameters:
        - name: Authorization
          in: header
          required: true
          example: Bearer YOUR_API_KEY
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
              anyOf:
                - required:
                    - image_urls
                - required:
                    - video_urls
                - required:
                    - audio_urls
              properties:
                model:
                  type: string
                  enum:
                    - magi-2-refs
                prompt:
                  type: string
                  minLength: 1
                  maxLength: 15000
                  description: Optional when references are supplied.
                image_urls:
                  type: array
                  items:
                    type: string
                    format: uri
                    pattern: ^https://
                  minItems: 1
                  maxItems: 10
                  description: Reference images, up to 30 MB each.
                duration:
                  type: integer
                  minimum: 4
                  maximum: 30
                  default: 5
                  description: Requested output duration in seconds.
                resolution:
                  type: string
                  enum:
                    - 1080p
                  default: 1080p
                  description: Output resolution. The quality alias is accepted.
                ratio:
                  type: string
                  enum:
                    - '16:9'
                    - '9:16'
                    - '1:1'
                    - '4:3'
                    - '3:4'
                    - '21:9'
                  default: '16:9'
                  description: Output aspect ratio. The aspect_ratio alias is accepted.
                generate_audio:
                  type: boolean
                  default: true
                  description: Generate synchronized audio.
                seed:
                  type: integer
                  minimum: 0
                  maximum: 4294967295
                  description: Seed for more repeatable results.
                custom_callback_url:
                  type: string
                  format: uri
                  description: Public URL that receives task updates.
                video_urls:
                  type: array
                  items:
                    type: string
                    format: uri
                    pattern: ^https://
                  minItems: 1
                  maxItems: 5
                  description: >-
                    MP4 or MOV, 2–30 seconds and up to 200 MB each. Up to 30
                    seconds total across all video references.
                audio_urls:
                  type: array
                  items:
                    type: string
                    format: uri
                    pattern: ^https://
                  minItems: 1
                  maxItems: 5
                  description: >-
                    WAV or MP3, 2–30 seconds and up to 15 MB each. Up to 30
                    seconds total across all audio references.
            example:
              model: magi-2-refs
              prompt: A slow camera push along the coastline at sunrise.
              duration: 5
              image_urls:
                - https://example.com/coastline.jpg
      responses:
        '200':
          description: Task submitted or application-level error.
          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: 5.82
                required:
                  - code
                  - msg
              example:
                code: 0
                msg: Success
                data:
                  img_uuid: c12b656c-747a-44fd-9c80-add79b0c52d5
                  cost: 5.82
        '401':
          description: Unauthorized

````

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