POST
javascript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 const axios = require('axios'); const api_key = "YOUR API-KEY"; const url = "https://api.segmind.com/v1/faceswap-hyperface-by-facefusion"; const data = { "source_image": "https://segmind-resources.s3.amazonaws.com/input/239704fa-c11a-4a80-a124-c61c30de07c0-hyperswap-source.jpg", "target_image": "https://segmind-resources.s3.amazonaws.com/input/d4966189-937c-42e1-b047-9d11ebb81feb-hyperswap-target.jpg", "model_name": "hyperswap_1c", "output_format": "webp", "output_quality": 70 }; (async function() { try { const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } }); console.log(response.data); } catch (error) { console.error('Error:', error.response.data); } })();
RESPONSE
image/jpeg
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


source_imagestr *

Input URL or base64 string of the face image. Recommended for high-quality source images.


target_imagestr *

URL or base64 string of the target image. Best if it has clear facial details.


model_nameenum:str ( default: hyperswap_1c )

Select the model variant; choose 1a for speed, 1c for quality.

Allowed values:


output_formatenum:str ( default: webp )

Choose output format; JPEG for compatibility, PNG for lossless quality.

Allowed values:


output_qualityint ( default: 70 )

Set image quality; 70 for web, 95 for print.

min : 10,

max : 100

To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.

Hyperswap: Advanced AI Face Swap Model

What is Hyperswap?

Hyperswap is a next-generation AI face swapping model built for creators, developers, and production teams who need fast, accurate, and natural-looking identity transfer in images. Developed by the team behind FaceFusion, Hyperswap specializes exclusively in high-quality face replacement, preserving the target image’s lighting, angles, and expressions while seamlessly transferring the identity from a source face.

Engineered for both speed and fidelity, Hyperswap makes professional-grade face swapping accessible for entertainment, marketing, virtual production, and large-scale automated workflows.


Key Features

  • High-Precision Face Swapping: Transfers source facial identity onto the target image while maintaining realistic lighting, pose, and expression consistency
  • Multiple Model Variants: Choose between hyperswap_1a (speed optimized), hyperswap_1b (balanced), or hyperswap_1c (high quality) depending on your workflow
  • Configurable Output Quality: Adjust output quality from 10–100, with format choices including JPEG, PNG, and WebP
  • Accurate Facial Mapping: Advanced detection ensures reliable alignment even with slight pose variations
  • Seamless Integration: Simple API supporting URL and base64 input for easy integration into content pipelines

Best Use Cases

Entertainment & Media: Produce concept previews, create alternate character versions, generate social media face swap content, or mock up scenes quickly and realistically.

Marketing & Advertising: Localize campaigns, test creative variations with different faces, or generate personalized promotional assets at scale.

Virtual Production & Gaming: Quickly create face-swapped character variants, populate worlds with diverse identities, or prototype avatar ideas.

Automation & Batch Workflows: Efficiently process large volumes of images using Hyperswap_1a for speed or 1b/1c for refined quality.


Prompt Tips and Output Quality

Hyperswap works on image inputs, not text prompts. For best results:

Source Image Requirements

  • High resolution (minimum 512px)
  • Clear, unobstructed face
  • Neutral or natural lighting
  • Frontal or near-frontal angles recommended

Target Image Selection

  • Choose images with lighting and angle similar to the source
  • Neutral expressions provide the most consistent swaps
  • Avoid heavy occlusion or extreme poses

Model Selection Strategy

  • Start with hyperswap_1c for quality benchmarking
  • Use hyperswap_1a for batch production when speed is critical
  • Select hyperswap_1b for balanced everyday workflows

Quality Settings

  • Use 95+ for final deliverables or print-level output
  • Use 70–85 for web or social content
  • PNG → best for lossless quality
  • JPEG → ideal for smaller file sizes
  • WebP → excellent compression for modern web applications

Processing Considerations

Higher output quality increases processing time. For large batches, hyperswap_1a with quality 80 is ideal; reserve 1c and higher-quality settings for final assets or high-visibility images.


FAQs

How is Hyperswap different from FaceFusion? FaceFusion is the framework and engine, while Hyperswap is the specialized face swap model designed exclusively for identity transfer with high accuracy and speed-quality variants.

What’s the difference between hyperswap_1a, 1b, and 1c?

  • 1a → fastest, ideal for batches
  • 1b → balanced, versatile
  • 1c → best quality, highest fidelity

Does Hyperswap do face enhancement or beautification? No. Hyperswap is strictly a face swapping model and does not alter or enhance facial features beyond identity transfer.

Can I use Hyperswap with partially obscured faces? It works best with clear, visible faces. Heavy occlusion (masks, hair, strong shadows) may reduce accuracy.

What output format should I choose?

  • PNG for lossless quality
  • JPEG for general use
  • WebP for web-optimized projects

Does Hyperswap work with multiple faces in one image? Hyperswap swaps the most prominent detected face. For multi-face swaps, process each face separately for full control.