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

# Specific Video Swap

> Swapping specific faces in a video based on a reference image.

## Request

Make a `POST` request to below endpoint and pass the required parameters in the request body.

```curl curl theme={null}
--request POST 'https://modelslab.com/api/v6/faceswap/specific_video_swap' \
```

## Body

```json json theme={null}
{    "key": "your_api_key",    
     "init_video": "https://tawk.link/6332cd5154f06e12d8971855/vc/66d997a6a2bc5fe2b627a250/v/4239c555189b772d5ca1bd5aa4bf872c4c12a07e/sdfsdfsdf.mp4",    
     "init_image" :"https://images-ext-1.discordapp.net/external/rJOvGZHIWsIijkfvCn5dByZNh_RfZZxUIiyyo7yOFIY/https/images.hindustantimes.com/rf/image_size_630x354/HT/p2/2017/12/27/Pictures/_1e5bc084-ead1-11e7-ad70-11504944e689.jpg?format=webp&width=984&height=553",    
     "reference_image": "https://images-ext-1.discordapp.net/external/Z8sBOyxEy9tsqkd9gsNK2dHZh-Em6LDqrmyjcDeMXII/https/i.ibb.co/2PGZ3p7/lmao.png?format=webp&quality=lossless&width=412&height=662",    
     "output_format": "mp4",    
     "webhook": null,    
     "track_id": null
}
```


## OpenAPI

````yaml POST /faceswap/specific_video_swap
openapi: 3.1.0
info:
  title: ModelsLab Face Swap API
  description: >-
    AI-powered face swap API supporting image and video face swapping with
    advanced controls
  license:
    name: MIT
  version: 6.0.0
servers:
  - url: https://modelslab.com/api/v6
    description: Main API server
security: []
paths:
  /faceswap/specific_video_swap:
    post:
      summary: Specific face swap in video
      description: >-
        Swaps specific faces in a video based on a reference image
        identification
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpecificVideoSwapRequest'
      responses:
        '200':
          description: Specific video face swap response
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/SuccessVideoFaceSwapResponse'
                  - $ref: '#/components/schemas/ProcessingVideoFaceSwapResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    SpecificVideoSwapRequest:
      type: object
      required:
        - key
        - init_image
        - init_video
        - reference_image
      properties:
        key:
          type: string
          description: Your unique API key used for authorization
        init_image:
          type: string
          format: uri
          description: The image containing multiple faces to be swapped
        init_video:
          type: string
          format: uri
          description: The video containing the face(s) to replace the faces in the image
        reference_image:
          type: string
          format: uri
          description: >-
            A reference image containing the specific face to swap from the
            initial image
        output_format:
          type: string
          default: mp4
          description: The desired output format of the video
        watermark:
          type: boolean
          default: true
          description: Indicates if the generated result should include a watermark
        webhook:
          type: string
          format: uri
          nullable: true
          description: >-
            A URL to receive a POST API call once the video generation is
            complete
        track_id:
          type: integer
          nullable: true
          description: An ID included in the webhook response to identify the request
    SuccessVideoFaceSwapResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
        generationTime:
          type: number
          description: Time taken to generate the video in seconds
        id:
          type: integer
          description: Unique identifier for the generation request
        output:
          type: array
          items:
            type: string
            format: uri
          description: Array of URLs to the generated videos
        proxy_links:
          type: array
          items:
            type: string
            format: uri
          description: Array of proxy URLs for the generated videos
        meta:
          type: object
          description: Metadata about the video generation process
          properties:
            file_prefix:
              type: string
            outdir:
              type: string
            output_format:
              type: string
            reference_image:
              type: string
              format: uri
            seed:
              type: integer
            source_image:
              type: string
              format: uri
            target_video_url:
              type: string
              format: uri
            watermark:
              type: string
            watermark_image:
              type: string
              nullable: true
    ProcessingVideoFaceSwapResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - processing
        tip:
          type: string
          description: Helpful tip about the processing status
        eta:
          type: integer
          description: Estimated time remaining in seconds
        message:
          type: string
          description: Status message about the processing
        fetch_result:
          type: string
          format: uri
          description: URL to fetch the result when processing is complete
        id:
          type: integer
          description: Unique identifier for the generation request
        output:
          type: array
          items:
            type: string
          description: Empty array during processing
        meta:
          type: object
          description: Metadata about the video generation process
        future_links:
          type: array
          items:
            type: string
            format: uri
          description: >-
            Array of URLs where the videos will be available once processing is
            complete
    Error:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - error
        message:
          type: string
          description: Error message description

````