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

# Generate Video to Video API

> Transform source videos using AI-powered models to create new videos with various styles and effects.

## Overview

The Video to Video Generate API allows you to transform source videos using advanced AI models. This powerful API enables you to apply various styles, effects, and transformations to your videos, creating entirely new content while preserving the core motion and structure of the original.


## OpenAPI

````yaml POST /api/v1/video2video/generate
openapi: 3.1.0
info:
  title: GoEnhance API
  description: ''
  version: 1.0.0
servers:
  - url: https://api.goenhance.ai
security:
  - bearerAuth: []
tags:
  - name: Basic
  - name: Video2Video
paths:
  /api/v1/video2video/generate:
    post:
      tags:
        - Video2Video
      summary: Generate Video
      parameters:
        - name: Authorization
          in: header
          description: ''
          required: false
          example: Bearer xxx
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                args:
                  type: object
                  properties:
                    model:
                      type: integer
                      description: >-
                        Model ID ,  From /api/v1/video2video/modellist , use the
                        value in item
                    duration:
                      type: integer
                      description: The duration of the video conversion, in seconds
                      x-apifox:
                        enumDescriptions:
                          '1': 3s
                          '2': 5s
                          '3': 10s
                          '4': 20s
                      minimum: 3
                      maximum: 30
                    reference_video_url:
                      type: string
                      description: Max - 50M(mp4/mov) https url
                    seed:
                      type: integer
                      minimum: -1
                      maximum: 2147483647
                      description: >-
                        Random seed value, used to fix the video conversion,
                        generally -1 is used
                    video_refer:
                      type: integer
                      description: >-
                        V2 Only, the V2 model is used to convert videos to
                        different conversion intensities. The options are More
                        prompt, balance, and More video.
                      enum:
                        - 1
                        - 2
                        - 3
                    prompt:
                      type: string
                      description: >-
                        V2 Only, the V2 version of the model can change the
                        content of the video, such as putting on a hat.
                      minLength: 0
                      maxLength: 500
                    subject_only:
                      type: boolean
                      description: Keep only the main subject, remove the background
                    subject_prompt:
                      type: string
                      description: >-
                        Only valid when subject_type = CUSTOM.Prompt used to
                        retain the subject. For example, if you write dog, only
                        the dog in the video will be converted into anime style,
                        and the rest will retain the real state.
                    subject_type:
                      type: string
                      enum:
                        - PERSON
                        - CUSTOM
                      description: >-
                        Used to select whether you want the system default
                        retention principal or a custom retention principal.
                    bg_custom:
                      type: boolean
                      description: >-
                        While keeping the subject, the background is replaced
                        with a solid color background.
                    bg_color:
                      type: string
                      description: >-
                        This takes effect when bg_custom = true.must be hash
                        color, such as #000000
                    resolution:
                      type: string
                      enum:
                        - 540p
                        - 720p
                      description: v5 only (default 720p)
                  required:
                    - model
                    - duration
                    - reference_video_url
                  x-apifox-orders:
                    - model
                    - duration
                    - reference_video_url
                    - seed
                  x-apifox-ignore-properties: []
                type:
                  type: string
                  description: mx-v2v
                  enum:
                    - mx-v2v
                  x-apifox:
                    enumDescriptions:
                      mx-v2v: ''
              required:
                - args
                - type
              x-apifox-orders:
                - args
                - type
              x-apifox-ignore-properties: []
            example:
              args:
                model: 2
                duration: 10
                reference_video_url: >-
                  https://cdn.goenhance.ai/user/upload-data/video-to-video/333768e610e442d02e8030693def0b6e.mp4
              type: mx-v2v
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  msg:
                    type: string
                  data:
                    type: object
                    properties:
                      img_uuid:
                        type: string
                    required:
                      - img_uuid
                    x-apifox-orders:
                      - img_uuid
                    x-apifox-ignore-properties: []
                required:
                  - code
                  - msg
                  - data
                x-apifox-orders:
                  - code
                  - msg
                  - data
                x-apifox-ignore-properties: []
              examples:
                '1':
                  summary: Success
                  value:
                    code: 0
                    msg: Success
                    data:
                      img_uuid: c12b656c-747a-44fd-9c80-add79b0c52d5
                '2':
                  summary: fail
                  value:
                    code: -1
                    msg: ''
          headers: {}
        '401':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  msg:
                    type: string
                required:
                  - code
                  - msg
                x-apifox-orders:
                  - code
                  - msg
                x-apifox-ignore-properties: []
              example:
                code: 401
                msg: Token is required
          headers: {}
        '500':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
              example:
                code: 500
                msg: ''
          headers: {}
      deprecated: false
      security: []
components: {}

````