> For the complete documentation index, see [llms.txt](https://savv-pro.gitbook.io/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://savv-pro.gitbook.io/welcome/ai-face-swap-api/quick-start.md).

# Quick Start

{% hint style="info" %}
**Good to know:**&#x20;

* **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, JPEG, 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.
  {% endhint %}

## 🔑 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 [RapidAPI](https://rapidapi.com) and subscribe to the [**AI Face Swap**](https://rapidapi.com/hawksavvy-hawksavvy-default/api/ai-face-swap2/playground/apiendpoint_ae8a9661-d3f6-48f6-831f-19fc997b05d9).
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:**  `/public/process/files`
* **Headers:**
  * `x-rapidapi-key: YOUR_API_KEY`
  * `x-rapidapi-host:  ai-face-swap2.p.rapidapi.com`
  * `Content-Type: application/x-www-form-urlencoded`
* **Body:** Upload the **source image** and the **target face image**

{% hint style="info" %}
**Good to know:**&#x20;

* **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.
* **Refer to the status codes documentation** to understand API [response errors](/welcome/ai-face-swap-api/status-code.md) and their meanings.
  {% endhint %}
