Skip to main content

Video Face Swap

Perform advanced face swapping in videos using cutting-edge AI technology through the 1min.AI API. This feature allows you to seamlessly replace faces in video content while maintaining natural expressions, movements, and lighting conditions.

Key Features

  • Advanced Face Detection: Precise face detection and tracking throughout video sequences
  • Natural Movement: Maintains facial expressions and head movements realistically
  • High Quality: Professional-grade results with smooth transitions
  • Lighting Preservation: Adapts swapped faces to match original lighting conditions
  • Multiple Formats: Support for various video input and output formats
  • Frame-by-Frame Processing: Ensures consistency across all video frames

Supported Models

The Video Face Swap API uses specialized computer vision models:

Qubico Models:

  • Qubico/video-toolkit - Qubico Video Faceswap (Primary model for video face swapping)

Note: This feature uses specialized computer vision models optimized for video face manipulation rather than general-purpose language models.

API Reference

Request Headers

FieldValue
API-KEY<api-key>
Content-Typeapplication/json

Request Parameters

Field NameTypeDescriptionRequired
typestringMust be "VIDEO_FACE_SWAPPER"✔️
modelstringMust be "Qubico/video-toolkit"✔️
conversationIdstringMust be "VIDEO_FACE_SWAPPER"✔️
promptObject.targetVideoUrlstringTarget video URL or asset key (video to modify)✔️
promptObject.swapImageUrlstringSource face image URL or asset key (face to insert)✔️
promptObject.swapFacesIndexarrayIndex of faces to swap from source image
promptObject.targetFacesIndexarrayIndex of faces to target in video

Example Request

API Playground

https://api.1min.ai/api/features

Generated cURL Command:

curl -X POST "https://api.1min.ai/api/features" \
-H "API-KEY: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"type": "VIDEO_FACE_SWAPPER",
"model": "Qubico/video-toolkit",
"conversationId": "VIDEO_FACE_SWAPPER",
"promptObject": {
"targetVideoUrl": "your-target-video-asset-key",
"swapImageUrl": "your-face-image-asset-key",
"swapFacesIndex": [
0
],
"targetFacesIndex": [
0
]
}
}'

Response Format

The API returns a JSON response with the processed video containing the face swap:

{}

Technical Requirements

Input Specifications

Target Video Requirements:

  • Formats: MP4, MOV, AVI, MKV, WebM
  • Resolution: 720p to 4K supported
  • Duration: Maximum 60 seconds per video
  • File Size: Maximum 50MB
  • Frame Rate: 24-60 FPS supported

Face Image Requirements:

  • Formats: JPG, PNG, WebP
  • Resolution: Minimum 256x256 pixels
  • Quality: High-resolution images produce better results
  • Face Visibility: Clear, front-facing portraits work best
  • File Size: Maximum 10MB

Output Specifications

  • Default Format: MP4 with H.264 encoding
  • Quality Levels: High (1080p), Medium (720p), Low (480p)
  • Audio: Original audio preserved by default
  • Processing Time: Varies by video length and quality settings

Best Practices

For Optimal Results

  1. High-Quality Inputs: Use high-resolution videos and images
  2. Clear Face Visibility: Ensure faces are clearly visible and well-lit
  3. Similar Angles: Face image should match the general angle/pose in the video
  4. Consistent Lighting: Better results with consistent lighting conditions
  5. Stable Footage: Less camera shake produces cleaner swaps

Face Index Parameters

  • swapFacesIndex: Specifies which face(s) from the source image to use (0-based index)
  • targetFacesIndex: Specifies which face(s) in the target video to replace (0-based index)
  • Default: If not specified, the system will automatically detect and use the most prominent faces
  • Multiple Faces: Use arrays like [0,1] to specify multiple faces for swapping

Use Cases

Entertainment & Creative

  • Content Creation: Create entertaining social media content
  • Film Production: Preview casting choices or create placeholder footage
  • Personal Projects: Fun videos for friends and family
  • Parody Content: Create comedic content with face swaps

Professional Applications

  • Marketing: Create personalized advertising content
  • Training Videos: Protect privacy while maintaining engagement
  • Demonstration: Show products or services with different presenters
  • Accessibility: Replace speakers while maintaining original content

Ethical Guidelines

When using Video Face Swap technology, please consider:

  1. Consent: Always obtain proper consent before using someone's likeness
  2. Disclosure: Clearly label content as AI-generated when sharing publicly
  3. Privacy: Respect individual privacy rights and local regulations
  4. Authenticity: Avoid creating misleading or deceptive content
  5. Legal Compliance: Follow applicable laws regarding deepfakes and synthetic media

Limitations

  • Processing Time: Complex videos may take several minutes to process
  • Face Detection: Works best with clearly visible, front-facing faces
  • Multiple Faces: Currently optimized for single face replacement per video
  • Extreme Angles: Side profiles and extreme angles may produce variable results
  • Rapid Movement: Very fast facial movements may affect swap quality

Error Handling

Common error scenarios:

  • No detectable faces in target video or source image
  • File format not supported or corrupted files
  • Files exceeding size or duration limits
  • Insufficient face visibility or quality
  • Network timeouts for large file processing

For detailed error codes and troubleshooting, refer to the main API documentation.

Security & Privacy

  • Data Protection: All uploaded content is processed securely and deleted after processing
  • No Storage: Videos and images are not permanently stored on our servers
  • Encryption: All data transmission uses SSL/TLS encryption
  • Compliance: Adheres to data protection regulations and privacy standards