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

# Lip Sync Video

> Lip Sync Video. **How it works** — one talking-head video plus one audio track: the person in the video is re-animated to speak your audio. Only the mouth region is redrawn; everything else in the frame is left untouched, so the output keeps the resolution, framing and background of your source video.

⚠️ **There is no `duration` and no `resolution` parameter, and this endpoint rejects neither — it simply ignores them.** Both are measured. Before any tokens are deducted, GoEnhance transfers `video_url` and `audio_url` to its own storage, then reads the real duration and the real video resolution. Those measurements set the price and enforce the limits below. Because the files are measured and then sent onward from GoEnhance's storage, swapping a URL afterwards has no effect.

**Output length** — depends on `video_mode`:

| video_mode | output length |
|---|---|
| `normal` (default) | the shorter of your video and your audio |
| `loop` | the full length of your audio; the video is played forward and backward on repeat to fill it |

**Video requirements** — up to 300MB, short side at most 1080 pixels (540p / 720p / 1080p, portrait or landscape). A face must be visible; frames without a detectable face are passed through unchanged. Anything above 1080p is rejected.

**Audio requirements** — up to 100MB. Clear speech with little background noise gives the best lip sync.

**Maximum output length**, by the resolution of your source video:

| source resolution | max output |
|---|---|
| 540p | 420s |
| 720p | 420s |
| 1080p | 300s |

Going over the limit is rejected before any tokens are deducted — the clip is never silently truncated.

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

| source resolution | tokens/s | USD/s |
|---|---|---|
| 540p | 0.2 | $0.004 |
| 720p | 0.3 | $0.006 |
| 1080p | 0.5 | $0.010 |

A 60-second output therefore costs 12 tokens at 540p, 18 tokens at 720p, or 30 tokens at 1080p. Partial seconds are rounded up.

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-lipsync-video.json POST /api/v1/videos/generations
openapi: 3.1.0
info:
  title: GoEnhance API - Lip Sync Video
  description: Make the person in an existing video speak your audio track.
  version: 1.0.0
servers:
  - url: https://api.goenhance.ai
security: []
paths:
  /api/v1/videos/generations:
    post:
      tags:
        - VideoGenerations
      summary: Lip Sync Video
      description: >-
        Lip Sync Video. **How it works** — one talking-head video plus one audio
        track: the person in the video is re-animated to speak your audio. Only
        the mouth region is redrawn; everything else in the frame is left
        untouched, so the output keeps the resolution, framing and background of
        your source video.


        ⚠️ **There is no `duration` and no `resolution` parameter, and this
        endpoint rejects neither — it simply ignores them.** Both are measured.
        Before any tokens are deducted, GoEnhance transfers `video_url` and
        `audio_url` to its own storage, then reads the real duration and the
        real video resolution. Those measurements set the price and enforce the
        limits below. Because the files are measured and then sent onward from
        GoEnhance's storage, swapping a URL afterwards has no effect.


        **Output length** — depends on `video_mode`:


        | video_mode | output length |

        |---|---|

        | `normal` (default) | the shorter of your video and your audio |

        | `loop` | the full length of your audio; the video is played forward
        and backward on repeat to fill it |


        **Video requirements** — up to 300MB, short side at most 1080 pixels
        (540p / 720p / 1080p, portrait or landscape). A face must be visible;
        frames without a detectable face are passed through unchanged. Anything
        above 1080p is rejected.


        **Audio requirements** — up to 100MB. Clear speech with little
        background noise gives the best lip sync.


        **Maximum output length**, by the resolution of your source video:


        | source resolution | max output |

        |---|---|

        | 540p | 420s |

        | 720p | 420s |

        | 1080p | 300s |


        Going over the limit is rejected before any tokens are deducted — the
        clip is never silently truncated.


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


        | source resolution | tokens/s | USD/s |

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

        | 540p | 0.2 | $0.004 |

        | 720p | 0.3 | $0.006 |

        | 1080p | 0.5 | $0.010 |


        A 60-second output therefore costs 12 tokens at 540p, 18 tokens at 720p,
        or 30 tokens at 1080p. Partial seconds are rounded up.


        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:
                    - lipsync-video
                  description: Model name. Must be `lipsync-video`.
                video_url:
                  type: string
                  format: uri
                  description: >-
                    Video containing the person to re-animate (up to 300MB,
                    short side at most 1080 pixels). Required. Its measured
                    resolution sets the price tier and the maximum output
                    length.
                audio_url:
                  type: string
                  format: uri
                  description: >-
                    Speech audio to lip-sync to (up to 100MB). Required.
                    Together with the video it determines the output length,
                    which is what you are billed for.
                video_mode:
                  type: string
                  enum:
                    - normal
                    - loop
                  default: normal
                  description: >-
                    What to do when the video and the audio are not the same
                    length. `normal` trims to whichever is shorter. `loop` keeps
                    all of your audio and repeats the video (forward, then
                    reversed, ping-pong style) to fill it.
                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
                - video_url
                - audio_url
            example:
              model: lipsync-video
              video_url: https://example.com/speaker.mp4
              audio_url: https://example.com/speech.mp3
              video_mode: normal
      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
                required:
                  - code
                  - msg
                  - data
              examples:
                '1':
                  summary: Success
                  value:
                    code: 0
                    msg: Success
                    data:
                      img_uuid: c12b656c-747a-44fd-9c80-add79b0c52d5
                '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

````