Qubico
  1. Faceswap
Qubico
  • Get Started
    • Overview
    • Quickstart
  • Endpoints
    • Flux
      • Flux with LoRA and Controlnet
      • Available LoRA and Controlnet
      • Flux API with Redux Variation, Fill, Inpaint and Outpaint
      • Create Task
        • Kontext
        • Text to Image
        • Image to Image
      • Get task
    • AI Hug
      • Get Task
      • Create Task
    • Faceswap
      • Multi Faceswap
        POST
      • Image Faceswap
        POST
      • Video Faceswap
        POST
      • Get Task
        GET
    • TTS
      • Zeroshot Text-to-Speech F5-TTS
      • Get Task
    • Trellis
      • Create Task
      • Get Task
    • WanX
      • Generate WanX Task with LoRA Using Qubico
      • Available LoRA Types for Wanx
      • Use Cases for Wanx LoRA
      • Use Cases for Wanx Control Camera
      • Create Task
      • Get Task
    • Skyreels
      • Create Task
      • Get Task
    • Framepack
      • Create Task
      • Get Task
    • Hunyuan Video
      • How to Make a Hunyuan API Call
      • Get Task
      • Generate Video
    • Mmaudio
      • Get Task
      • Generate Audio
    • DiffRhythm
      • Generate Audio
      • Get Task
    • Ace Step
      • Create Task
        • Text to Audio
        • Audio to Audio
        • Audio Edit
        • Audio Extend
      • Get Task
    • Tools
      • File Upload API
      • Video Upscale
      • Video Upscale-Get Task
      • Remove Background API
      • Remove Background-Get Task
      • Segment With Prompt API
      • Segment With Prompt API-Get Task
      • Image Upscale(Super Resolution) API
      • Image Upscale-Get Task
    • Account Management
      • Account Info
      • Task List Info
      • User Task History
  • Resources
    • Change Log
    • Output Storage
    • Unified API Schema
    • Webhook
    • Billings
  1. Faceswap

Multi Faceswap

POST
/api/v1/task

This async endpoint from Qubico's Faceswap API swaps the face from the swap_image to the target_image.

INFO

This async endpoint from Qubico's Faceswap API swaps faces from the swap_image onto the target_image.
Users on Qubico could change target faces (≥1) following specific logic which you could check as follows.

Format & Constraints

  1. Size & Resolution: both swap_image and target_image should be under 2048 x 2048 resolution each.
  2. Input Format: both swap_image and target_image should be passed in as URLs (ending in .jpg / .jpeg / .png / .webp) or as base64 strings.

Pricing

Task-typePrice (USD)
multi-face-swap$0.015 per generation

Param Details

The multi-face-swap API logic operates based on the sequential order of faces detected by the algorithm, with the model assigning numeric labels from 0 to n. While users can generally expect the API to sort faces in a left-to-right order, diagonal face positioning in photos may alter this sequence.

For instance, when one face appears in the upper-left and another in the lower-right, the model might label the upper-left face as 1 and the lower-right as 0. Conversely, a lower-left face could be labeled 0 while an upper-right face becomes 1. This positional variation in labeling occurs due to the algorithm's spatial evaluation of face arrangements within the frame.

Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/v1/task' \
--header 'x-api-key;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "Qubico/image-toolkit",
    "task_type": "multi-face-swap",
    "input": {
        "swap_image": "https://i.ibb.co/kVPGB4wG/input.png",
        "target_image": "https://i.ibb.co/Lhbjs0tx/source.png",
        "swap_faces_index": "0,1",
        "target_faces_index": "0,1"
    },
    "config": {
        "webhook_config": {
            "endpoint": "",
            "secret": ""
        }
    }
}'
Response Response Example
{
    "code": 200,
    "data": {
        "task_id": "90efd2db-bcfc-413f-a0be-c893850c9d68",
        "model": "Qubico/image-toolkit",
        "task_type": "face-swap",
        "status": "pending",
        "config": {
            "webhook_config": {
                "endpoint": "",
                "secret": ""
            }
        },
        "input": {},
        "output": null,
        "meta": {},
        "detail": null,
        "logs": [],
        "error": {
            "code": 0,
            "raw_message": "",
            "message": "",
            "detail": null
        }
    },
    "message": "success"
}

Request

Header Params

Body Params application/json

Examples

Responses

🟢200Success
application/json
Body

Modified at 2025-07-06 06:34:09
Previous
Create Task
Next
Image Faceswap
Built with