> For the complete documentation index, see [llms.txt](https://doc.faceplugin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.faceplugin.com/integration/http-api/face-recognition.md).

# Face Recognition

Faceplugin Face Recognition HTTP API. POST /api/detect, /api/quality, /api/feature, /api/match, and /api/similarity on port 8083. JSON or form-data. CPU only.

This is the **still-image** Face Recognition API. It runs on Linux Docker image `faceplugin/face-recognition` and on the Windows app. Default port **8083**. The engine is **CPU only**.

Shared routes (health, machine code, activate, license status): [Shared endpoints](/integration/http-api/shared.md).

Process POSTs return **engine JSON**. There is **no** `POST /api/identify` on the server. There is no server-side 1:N gallery. Store templates in **your** database. Compare them with `/api/similarity`.

A call without a recognition license returns `code` 8 with `licenseError`.

**Face Recognition + Liveness** packages expose the same Face Recognition routes **plus** [`POST /api/liveness`](/integration/http-api/face-liveness.md) on port **8083**.

Install and run: [Face Recognition Linux SDK](/products/face-recognition-sdk/recognition/server-sdk/face-recognition-linux-sdk.md) · [Face Recognition Windows SDK](/products/face-recognition-sdk/recognition/server-sdk/face-recognition-windows-sdk.md).

### Try it

```bash
curl -s http://127.0.0.1:8083/api/health
IMG=$(base64 -w0 face.jpg)
curl -s -X POST http://127.0.0.1:8083/api/detect \
  -H 'Content-Type: application/json' \
  -d "{\"image\":\"$IMG\"}"
```

More one-liners: [Try it](/getting-started/try-it.md).

## `POST /api/detect`

Detect faces in one image.

{% tabs %}
{% tab title="JSON" %}

```json
{ "image": "<BASE64>", "cropImage": false }
```

`crop_image` is accepted as an alias.
{% endtab %}

{% tab title="form-data" %}
File field `image` (alias `file`). Text field `cropImage` (`true` / `false`). Same URL.
{% endtab %}
{% endtabs %}

Python: `sdk.detect(image, crop_image=False)`.

|                  |                                  |
| ---------------- | -------------------------------- |
| **Input**        | One image. Optional `cropImage`. |
| **Return value** | Engine JSON (not the envelope).  |

## `POST /api/quality`

Run ICAO-style quality checks on a face image. Same request body as detect. Python: `sdk.quality`.

|                  |                                |
| ---------------- | ------------------------------ |
| **Input**        | One image. Optional crop flag. |
| **Return value** | Engine JSON.                   |

## `POST /api/feature`

Extract a face **template** (feature vector). Store it. Compare it later with `/api/similarity`.

{% tabs %}
{% tab title="JSON" %}

```json
{ "image": "<BASE64>" }
```

{% endtab %}

{% tab title="form-data" %}
File field `image` (alias `file`).
{% endtab %}
{% endtabs %}

Python: `sdk.feature`.

|                  |                                |
| ---------------- | ------------------------------ |
| **Input**        | One image.                     |
| **Return value** | Engine JSON with the template. |

## `POST /api/match`

Compare **two photos** (1:1). The server detects and extracts internally.

{% tabs %}
{% tab title="JSON" %}

```json
{ "image1": "<BASE64>", "image2": "<BASE64>", "cropImage": false }
```

{% endtab %}

{% tab title="form-data" %}
File fields `image1` and `image2`. Text field `cropImage`.
{% endtab %}
{% endtabs %}

Python: `sdk.match`.

|                  |                                      |
| ---------------- | ------------------------------------ |
| **Input**        | Two images. Optional crop flag.      |
| **Return value** | Engine JSON with a similarity score. |

## `POST /api/similarity`

Compare **two templates** you already extracted.

```json
{ "feature1": "<BASE64>", "feature2": "<BASE64>" }
```

Aliases: `template1` / `template2`. Missing features return envelope `code: -1`. Both features must decode to the **same length**. Form-data uses **text** fields (not files).

### Related documentation

* [HTTP API overview](/integration/http-api.md) · [Face Liveness HTTP API](/integration/http-api/face-liveness.md) · [Hosting requirements](/integration/deploy-and-host/hosting-requirements.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.faceplugin.com/integration/http-api/face-recognition.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
