API.Market
Go to API.market
  • Welcome to API.market
  • What are API Products?
  • How to subscribe to a SaaS API Product?
  • Managing Subscriptions
  • Analytics & Logs
  • How can I cancel my Subscription?
  • How do I add payment details?
  • How does API.market charges me?
  • Error Codes
  • Seller Docs
    • API Seller Console
    • What is an API Product?
    • What is a Pricing Plan
    • Importing an API Source
    • Creating a Product using the Wizard
    • Testing Your APIs & Products
    • Analytics & Logs
    • Custom Usage
    • Overriding Custom Usage on Result Retrieval
  • FUNDAMENTALS
    • Convert Postman Collection to OpenAPI Yaml
    • Create OpenAPI spec using ChatGPT
  • About Us
  • API Product Docs
    • MagicAPI
      • Screenshot API
      • Domain Availability Checker API
      • WhoIS API
      • PDF Conversion API
      • Image Upscale API
      • DNS Checker API
      • Ageify API
      • Image Restoration API
      • Toon Me API
      • Coding Assistant
      • 🎭 FaceSwap API: Instantaneous replaces face with one another
      • 🏞️ Image Upload API
      • Deblurer API
      • Hair Changer API
      • 🤳🏻🤖AI Qr Code Generator API
      • Whisper API
      • Image Colorizer API
      • OpenJourney API
      • Object Remover API
      • Image Captioner API
      • Object Detector API
      • NSFW API
      • Crunchbase API
      • Pipfeed's Extract API Developer Documentation
      • Migrating from Capix FaceSwap API to magicapi/faceswap-capix API
    • BridgeML
      • Meta-Llama-3-8B-Instruct
      • Meta-Llama-3-70B-Instruct
      • Mistral-7B-Instruct-v0.1
      • Mixtral-8x22B-Instruct-v0.1
      • Meta-Llama-2-7b
      • Meta-Llama-2-13b
      • Meta-Llama-2-70b
      • Gemma-7b-it
      • NeuralHermes-2.5-Mistral-7B
      • BAAI/bge-large-en-v1.5
      • CodeLlama-70b-Instruct-hf
      • 🤖🧗Text-to-Image API
      • 📝🎧 Text to Audio API
    • Capix AI
      • FaceSwap Image and Video Face Swap API
      • MakeUp
      • Photolab.me
      • AI Picture Colorizer
      • AI Picture Upscaler
      • AI Background Remover
      • Object Remover
      • TTS Universal
      • Home GPT
      • AI & Plagiarism Checker
      • AI Story Generator
      • AI Essay Generator
      • Book Title Generator
    • Trueway
      • ⛕ 🗺️ Trueway Routing API
      • 🌐📍Trueway Geocoding API: Forward and Reverse Geocoding
      • 🛤️ ⏱️Trueway Matrix API: Travel Distance and Time
      • 🏛️ Trueway Places API
    • AILabTools
      • Cartoon-Yourself
    • SharpAPI
      • 📄 AI-Powered Resume/CV Parsing API
      • 🛩️ Airports Database & Flight Duration API
    • Text to Speech
      • Turn your text into Magical-sounding Audio
Powered by GitBook
On this page
  • ⚠️ Please use this API instead!
  • Key Features
  • Benefits
  • Image Process
  • Video Process
  • Get Result
  • ⚠️ Please use this API instead!
  1. API Product Docs
  2. Capix AI

FaceSwap Image and Video Face Swap API

Experience seamless digital transformations with our Image and Video Face Swap API.

PreviousCapix AINextMakeUp

Last updated 14 hours ago

⚠️ Please use this API instead!

Capix has decided to shut down this on 21st May 2025. To help our customers, we have released a compatible FaceSwap API built by engineers at API.market. Please reach out to support for any questions or help.

The FaceSwap Image & Video API offers a straightforward solution for replacing faces in images and videos. With over 500% cost savings compared to other services, it is the most affordable and reliable option available. This face swap AI API enables seamless face swapping using simple HTTP POST requests, making it ideal for developers looking to integrate face-swapping functionality into their applications.

image

Key Features

  • High-quality face swapping technology: Our API utilizes state-of-the-art algorithms to ensure seamless and realistic face swaps in both images and videos.

  • Easy integration: Comprehensive documentation and straightforward implementation make integrating our API into your project quick and hassle-free.

  • Customization options: Tailor the faceswap experience to suit your needs with customizable parameters for face detection, alignment, and blending.

  • Scalability and reliability: Built to handle high volumes of requests with minimal latency, ensuring a smooth and reliable user experience.

Benefits

  • Create hilarious memes, captivating social media content, and personalized experiences for your users.

  • Add fun filters to your mobile app, create entertaining videos for your social media platforms, or enhance your marketing campaigns with interactive experiences.

Description

The FaceSwap Image & Video API provides developers with the ability to perform face swaps in both images and videos with minimal effort. By leveraging the power of HTTP POST requests, this top face-swap API allows you to specify target and swap URLs to perform the face-swapping operation. The service is designed to be highly reliable and affordable, ensuring that developers can integrate face-swapping features without worrying about excessive costs.

Key Features:

  • Image Face Swap: Replace faces in images using a simple POST request with the best face swap API.

  • Video Face Swap: Perform face swaps in videos seamlessly with our video face swap API.

  • Cost-Effective: Over 500% cheaper than other face-swapping APIs.

  • Easy Integration: Simple HTTP POST requests for quick and easy integration.

  • Reliable Service: Consistent and dependable performance.

How to Use

Image Face Swap:

  1. Endpoint: https://api.magicapi.dev/api/v1/capix/faceswap/faceswap/v1/image

  2. Method: POST

  3. Headers:

    • accept: application/json

    • x-magicapi-key: YOUR_API_KEY

    • Content-Type: application/x-www-form-urlencoded

  4. Data:

    • target_url: URL of the image in which the face needs to be swapped.

    • swap_url: URL of the image containing the face to be swapped in.

Example Request:

curl -X 'POST' \
  'https://api.magicapi.dev/api/v1/capix/faceswap/faceswap/v1/image' \
  -H 'accept: application/json' \
  -H 'x-magicapi-key: YOUR_API_KEY' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'target_url=https%3A%2F%2Fstorage.ws.pho.to%2Fs2%2F7aa4876bc1f50bc92fc54cb3c326181ac5bbf5ef_m.jpeg&swap_url=https%3A%2F%2Fstorage.ws.pho.to%2Fs2%2F818f3e408ee37c090cf23a3d12e15a08ada80ad9_m.jpeg'

Video Face Swap:

  1. Endpoint: https://api.magicapi.dev/api/v1/capix/faceswap/faceswap/v1/video

  2. Method: POST

  3. Headers:

    • accept: application/json

    • x-magicapi-key: YOUR_API_KEY

    • Content-Type: application/x-www-form-urlencoded

  4. Data:

    • target_url: URL of the video in which the face needs to be swapped.

    • swap_url: URL of the image containing the face to be swapped in.

Example Request:

curl -X 'POST' \
  'https://api.magicapi.dev/api/v1/capix/faceswap/faceswap/v1/video' \
  -H 'accept: application/json' \
  -H 'x-magicapi-key: YOUR_API_KEY' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'target_url=https://storage.ws.pho.to/s2/7e2131eaef5e5cbb0d2c9eef7e2f19343b5a1292.mp4&swap_url=https%3A%2F%2Fstorage.ws.pho.to%2Fs2%2F818f3e408ee37c090cf23a3d12e15a08ada80ad9_m.jpeg'

Retrieve Face Swap Result:

  1. Endpoint: https://api.magicapi.dev/api/v1/capix/faceswap/result/

  2. Method: POST

  3. Headers:

    • accept: application/json

    • x-magicapi-key: YOUR_API_KEY

    • Content-Type: application/x-www-form-urlencoded

  4. Data:

    • request_id: The unique request ID received after initiating the face swap.

Example Request:

curl -X 'POST' \
  'https://api.magicapi.dev/api/v1/capix/faceswap/result/' \
  -H 'accept: application/json' \
  -H 'x-magicapi-key: YOUR_API_KEY' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'request_id=16bbe697-1323-4ead-9104-30a65ba52149'

Note: The Video Faceswap API is limited to a maximum duration of 4 seconds, even on premium or other plans. Additionally, this API cannot be used for any NSFW content or images, as that violates our policy.

By following these steps, developers can easily integrate face-swapping functionality into their applications using the FaceSwap API. Whether you need an image face swap API, video face swap API, or even a free face swap API for trial purposes, this service provides the most reliable and cost-effective solution on the market.

Image Process

curl -X 'POST' \
  'https://api.magicapi.dev/api/v1/capix/faceswap/faceswap/v1/image' \
  -H 'accept: application/json' \
  -H 'x-magicapi-key: API_KEY' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'target_url=https%3A%2F%2Fstorage.ws.pho.to%2Fs2%2F7aa4876bc1f50bc92fc54cb3c326181ac5bbf5ef_m.jpeg&swap_url=https%3A%2F%2Fstorage.ws.pho.to%2Fs2%2F818f3e408ee37c090cf23a3d12e15a08ada80ad9_m.jpeg'
import requests

headers = {
    'accept': 'application/json',
    'x-magicapi-key': 'API_KEY',
    'Content-Type': 'application/x-www-form-urlencoded',
}

data = {
    'target_url': 'https://storage.ws.pho.to/s2/7aa4876bc1f50bc92fc54cb3c326181ac5bbf5ef_m.jpeg',
    'swap_url': 'https://storage.ws.pho.to/s2/818f3e408ee37c090cf23a3d12e15a08ada80ad9_m.jpeg',
}

response = requests.post('https://api.magicapi.dev/api/v1/capix/faceswap/faceswap/v1/image', headers=headers, data=data)
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.magicapi.dev/api/v1/capix/faceswap/faceswap/v1/image');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'accept: application/json',
    'x-magicapi-key: API_KEY',
    'Content-Type: application/x-www-form-urlencoded',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'target_url=https%3A%2F%2Fstorage.ws.pho.to%2Fs2%2F7aa4876bc1f50bc92fc54cb3c326181ac5bbf5ef_m.jpeg&swap_url=https%3A%2F%2Fstorage.ws.pho.to%2Fs2%2F818f3e408ee37c090cf23a3d12e15a08ada80ad9_m.jpeg');

$response = curl_exec($ch);

curl_close($ch);
import axios from 'axios';

const response = await axios.post(
  'https://api.magicapi.dev/api/v1/capix/faceswap/faceswap/v1/image',
  new URLSearchParams({
    'target_url': 'https://storage.ws.pho.to/s2/7aa4876bc1f50bc92fc54cb3c326181ac5bbf5ef_m.jpeg',
    'swap_url': 'https://storage.ws.pho.to/s2/818f3e408ee37c090cf23a3d12e15a08ada80ad9_m.jpeg'
  }),
  {
    headers: {
      'accept': 'application/json',
      'x-magicapi-key': 'API_KEY'
    }
  }
);
fetch('https://api.magicapi.dev/api/v1/capix/faceswap/faceswap/v1/image', {
  method: 'POST',
  headers: {
    'accept': 'application/json',
    'x-magicapi-key': 'API_KEY'
  },
  body: new URLSearchParams({
    'target_url': 'https://storage.ws.pho.to/s2/7aa4876bc1f50bc92fc54cb3c326181ac5bbf5ef_m.jpeg',
    'swap_url': 'https://storage.ws.pho.to/s2/818f3e408ee37c090cf23a3d12e15a08ada80ad9_m.jpeg'
  })
});

Video Process

curl -X 'POST' \
  'https://api.magicapi.dev/api/v1/capix/faceswap/faceswap/v1/video' \
  -H 'accept: application/json' \
  -H 'x-magicapi-key: API_KEY' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'target_url=https://storage.ws.pho.to/s2/7e2131eaef5e5cbb0d2c9eef7e2f19343b5a1292.mp4&swap_url=https%3A%2F%2Fstorage.ws.pho.to%2Fs2%2F818f3e408ee37c090cf23a3d12e15a08ada80ad9_m.jpeg'
import requests

headers = {
    'accept': 'application/json',
    'x-magicapi-key': 'API_KEY',
    'Content-Type': 'application/x-www-form-urlencoded',
}

data = {
    'target_url': 'https://storage.ws.pho.to/s2/7e2131eaef5e5cbb0d2c9eef7e2f19343b5a1292.mp4',
    'swap_url': 'https://storage.ws.pho.to/s2/818f3e408ee37c090cf23a3d12e15a08ada80ad9_m.jpeg',
}

response = requests.post('https://api.magicapi.dev/api/v1/capix/faceswap/faceswap/v1/video', headers=headers, data=data)
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.magicapi.dev/api/v1/capix/faceswap/faceswap/v1/video');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'accept: application/json',
    'x-magicapi-key: API_KEY',
    'Content-Type: application/x-www-form-urlencoded',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'target_url=https://storage.ws.pho.to/s2/7e2131eaef5e5cbb0d2c9eef7e2f19343b5a1292.mp4&swap_url=https%3A%2F%2Fstorage.ws.pho.to%2Fs2%2F818f3e408ee37c090cf23a3d12e15a08ada80ad9_m.jpeg');

$response = curl_exec($ch);

curl_close($ch);
import axios from 'axios';

const response = await axios.post(
  'https://api.magicapi.dev/api/v1/capix/faceswap/faceswap/v1/video',
  new URLSearchParams({
    'target_url': 'https://storage.ws.pho.to/s2/7e2131eaef5e5cbb0d2c9eef7e2f19343b5a1292.mp4',
    'swap_url': 'https://storage.ws.pho.to/s2/818f3e408ee37c090cf23a3d12e15a08ada80ad9_m.jpeg'
  }),
  {
    headers: {
      'accept': 'application/json',
      'x-magicapi-key': 'API_KEY'
    }
  }
);
fetch('https://api.magicapi.dev/api/v1/capix/faceswap/faceswap/v1/video', {
  method: 'POST',
  headers: {
    'accept': 'application/json',
    'x-magicapi-key': 'API_KEY'
  },
  body: new URLSearchParams({
    'target_url': 'https://storage.ws.pho.to/s2/7e2131eaef5e5cbb0d2c9eef7e2f19343b5a1292.mp4',
    'swap_url': 'https://storage.ws.pho.to/s2/818f3e408ee37c090cf23a3d12e15a08ada80ad9_m.jpeg'
  })
});

Get Result

curl -X 'POST' \
  'https://api.magicapi.dev/api/v1/capix/faceswap/result/' \
  -H 'accept: application/json' \
  -H 'x-magicapi-key: API_KEY' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'request_id=16bbe697-1323-4ead-9104-30a65ba52149'
import requests

headers = {
    'accept': 'application/json',
    'x-magicapi-key': 'API_KEY',
    'Content-Type': 'application/x-www-form-urlencoded',
}

data = {
    'request_id': 'REQUEST_ID',
}

response = requests.post('https://api.magicapi.dev/api/v1/capix/faceswap/result/', headers=headers, data=data)
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.magicapi.dev/api/v1/capix/faceswap/result/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'accept: application/json',
    'x-magicapi-key: API_KEY',
    'Content-Type: application/x-www-form-urlencoded',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'request_id=REQUEST_ID');

$response = curl_exec($ch);

curl_close($ch);
import axios from 'axios';

const response = await axios.post(
  'https://api.magicapi.dev/api/v1/capix/faceswap/result/',
  new URLSearchParams({
    'request_id': 'REQUEST_ID'
  }),
  {
    headers: {
      'accept': 'application/json',
      'x-magicapi-key': 'API_KEY'
    }
  }
);
fetch('https://api.magicapi.dev/api/v1/capix/faceswap/result/', {
  method: 'POST',
  headers: {
    'accept': 'application/json',
    'x-magicapi-key': 'API_KEY'
  },
  body: new URLSearchParams({
    'request_id': 'REQUEST_ID'
  })
});

⚠️ Please use this API instead!

image
image
image

Capix has decided to shut down this on 21st May 2025. To help our customers, we have released a compatible FaceSwap API built by engineers at API.market. Please reach out to support for any questions or help.

Please instead use the API at: MagicAPI FaceSwap-Capix API (https://api.market/store/magicapi/faceswap-capix)
Please instead use the API at: MagicAPI FaceSwap-Capix API (https://api.market/store/magicapi/faceswap-capix)
Try FaceSwap Image & Video API on API.market