Skip to main content
POST
/
represent
Generate an embedding for one image
curl --request POST \
  --url https://deepface-cyybxg.fly.dev/represent \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "img": "<string>"
}
'
[
  {
    "embedding": [
      123
    ],
    "model_name": "<string>",
    "facial_area": {
      "x": 123,
      "y": 123,
      "w": 123,
      "h": 123
    },
    "face_confidence": 123
  }
]

Authorizations

Authorization
string
header
required

Use your API key as a bearer token.

Headers

x-request-id
string<uuid>

Optional UUID used for request tracing.

Body

img
string
required

Base64 image payload or data URL.

model_name
string

Approved model name from the current allowlist.

Example:

"Facenet"

detector_backend
string

Optional detector backend from the current allowlist.

Example:

"opencv"

enforce_detection
boolean
default:true
align
boolean
default:true
normalization
string

Optional DeepFace normalization mode.

Response

Embedding response

embedding
number[]
required
model_name
string
required
facial_area
object
face_confidence
number