Savv Pro
  • Welcome
    • FAQ
  • 🤖AI Background Remover API
    • 🚀Quick Start
    • 👨‍💻Status Code
  • 🗿AI Face Swap API
    • 🚀Quick Start
    • 👨‍💻Status Code
  • 🍏AI Object Remover API
    • 🚀Quick Start
    • 👨‍💻Status Code
  • 👁️AI Eye Color Changer API
    • 🚀Quick Start
    • 👨‍💻Status Code
Powered by GitBook
On this page
  • 🔑 Get your API keys
  • Make your first request
  1. AI Face Swap API

Quick Start

PreviousAI Face Swap APINextStatus Code

Last updated 3 months ago

Good to know:

  • Your API key is private – Keep it secure and do not share it publicly.

  • Regenerate compromised API keys – If your API key is leaked, generate a new one from your RapidAPI dashboard.

  • Supported formats – The API works with JPG, PNG, and WebP images.

  • Include required headers – Ensure your requests include the correct headers, such as x-rapidapi-key for authentication.

  • Rate limits apply – Check your usage limits on RapidAPI to avoid request failures.

🔑 Get your API keys

Your API requests require authentication using an API key. Any request without a valid API key will return an error.

To get started:

  1. Sign up on and subscribe to the .

  2. Obtain your API key from your RapidAPI dashboard.

📌 Note: Keep your API key secure and do not share it publicly. If your key is compromised, you can regenerate a new one from the RapidAPI dashboard.

Make your first request

You can quickly test the AI Face Swap API by requesting to swap faces in an image.

📌 Request Format:

  • Method: POST

  • Endpoint: /swap-face

  • Headers:

    • x-rapidapi-key: YOUR_API_KEY

    • Content-Type: multipart/form-data

  • Body: Upload the source image and the target face image

Good to know:

  • To swap a face in an image, simply upload the source image and target face image in the request body. The API processes the request and returns a URL to the swapped image.

  • Ensure the request includes the correct headers, including your API key (x-rapidapi-key) for authentication.

  • Monitor your rate limits based on your subscription plan to avoid request failures.

  • For troubleshooting, check the response message for details on invalid parameters, authentication errors, or unsupported file formats.

Take a look at how you might call this method using curl:

const axios = require('axios');

const encodedParams = new URLSearchParams();

const options = {
  method: 'POST',
  url: 'https://ai-face-swap2.p.rapidapi.com/public/process/',
  headers: {
    'x-rapidapi-key': '45dd2c909emshc6860efd9bad512p1ba614jsn2ad6c4147afd',
    'x-rapidapi-host': 'ai-face-swap2.p.rapidapi.com',
    'Content-Type': 'application/x-www-form-urlencoded'
  },
  data: encodedParams,
};

try {
	const response = await axios.request(options);
	console.log(response.data);
} catch (error) {
	console.error(error);
}
import axios from 'axios';

const encodedParams = new URLSearchParams();

const options = {
  method: 'POST',
  url: 'https://ai-face-swap2.p.rapidapi.com/public/process/',
  headers: {
    'x-rapidapi-key': '45dd2c909emshc6860efd9bad512p1ba614jsn2ad6c4147afd',
    'x-rapidapi-host': 'ai-face-swap2.p.rapidapi.com',
    'Content-Type': 'application/x-www-form-urlencoded'
  },
  data: encodedParams,
};

try {
	const response = await axios.request(options);
	console.log(response.data);
} catch (error) {
	console.error(error);
}

import requests

url = "https://ai-face-swap2.p.rapidapi.com/public/process/"

payload = {}
headers = {
	"x-rapidapi-key": "45dd2c909emshc6860efd9bad512p1ba614jsn2ad6c4147afd",
	"x-rapidapi-host": "ai-face-swap2.p.rapidapi.com",
	"Content-Type": "application/x-www-form-urlencoded"
}

response = requests.post(url, data=payload, headers=headers)

print(response.json())

Refer to the status codes documentation to understand API and their meanings.

🗿
🚀
RapidAPI
AI Face Swap
response errors