---
title: "Analysis of all faces from selfie image"
url: "https://developer.incode.com/api-reference/frame-analysis-analyze/"
section: "api-reference"
group: "Frame analysis"
version: "v1.1"
status: "live"
endpoint: "POST /omni/frame-analysis/analyze"
---
# Analysis of all faces from selfie image

`POST /omni/frame-analysis/analyze`

Base URL: `https://demo-api.incodesmile.com` — Incode demo environment

Authenticate users by comparing base64 image from request and user's existing face templates.
Each face from the image is analyzed, and relevant attributes are extracted. In case of failure, error description is returned.

## Path & query parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `api-version` | header | string | yes |  |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `base64Image` | string | yes | Base64 representation of image. |
| `videoRef` | string |  | Reference of video from which frame is extracted. |
| `frameRef` | string |  | Reference of frame that should be analyzed. |

## Responses

### 200

OK

Response body (`application/json`):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `identities` | array[AnalyzedIdentityDto] |  | List of identities analyzed from input base64image. |
| `identities.identityId` | string |  | Id of recognized customer. |
| `identities.estimatedAge` | integer (int32) |  | Estimated age based on extracted face. |
| `identities.error` | FrameAnalysisErrorDto |  | Error name. Possible error names are: LENSES_DETECTED, FACE_MASK_DETECTED, HEAD_COVER_DETECTED, CLOSED_EYES_DETECTED, SPOOF_ATTEMPT_DETECTED, USER_IS_NOT_RECOGNIZED |
| `identities.error.name` | string |  |  |
| `videoRef` | string |  | Reference of video from which frame is extracted. |
| `frameRef` | string |  | Reference of frame that is analyzed. |
| `error` | FrameAnalysisErrorDto |  | Error name. Possible error name is: FACE_EXTRACTION_FAILED |
| `error.name` | string |  |  |

## Code samples

Generated from this endpoint's method, path, and the conventional Incode headers. The base URL is the Incode demo environment; replace `<YOUR_API_KEY>` with a key for your region.

### cURL

```bash
curl -X POST https://demo-api.incodesmile.com/omni/frame-analysis/analyze \
  -H "x-api-key: <YOUR_API_KEY>" \
  -H "api-version: 1.0" \
  -H "Content-Type: application/json" \
  -d '{
    "base64Image": "",
    "videoRef": "",
    "frameRef": ""
  }'
```

### Node

```js
const res = await fetch("https://demo-api.incodesmile.com/omni/frame-analysis/analyze", {
  method: "POST",
  headers: {
      "x-api-key": "<YOUR_API_KEY>",
      "api-version": "1.0",
      "Content-Type": "application/json",
  },
    body: JSON.stringify({
      "base64Image": "",
      "videoRef": "",
      "frameRef": ""
    }),
});
const data = await res.json();
```

### Python

```python
import requests

headers = {
    "x-api-key": "<YOUR_API_KEY>",
    "api-version": "1.0",
    "Content-Type": "application/json",
}
res = requests.post("https://demo-api.incodesmile.com/omni/frame-analysis/analyze", headers=headers, json={
  "base64Image": "",
  "videoRef": "",
  "frameRef": ""
})
data = res.json()
```

### Java

```java
HttpRequest req = HttpRequest.newBuilder()
    .uri(URI.create("https://demo-api.incodesmile.com/omni/frame-analysis/analyze"))
    .header("x-api-key", "<YOUR_API_KEY>")
    .header("api-version", "1.0")
    .header("Content-Type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"base64Image\": \"\",\n  \"videoRef\": \"\",\n  \"frameRef\": \"\"\n}"))
    .build();
HttpResponse<String> res = HttpClient.newHttpClient()
    .send(req, HttpResponse.BodyHandlers.ofString());
```

### Example response

```json
{
  "success": true,
  "status": "OK"
}
```
