Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Face Embedding

Returns a numeric vector describing the main face in an image, for face matching in your own system. This is a utility, not a detector: it gives no real or fake verdict.

SlugIDStatusTaggedModel version
face-embedding9ActiveNov1

What it does

The largest face in the image is located and converted into a 512-number vector. Vectors of the same person are close together, so you can compare two faces by the cosine similarity of their vectors. Vectors are L2-normalized, so the dot product gives the cosine similarity directly.

It does not check whether the face is real, live or swapped. Combine it with face-liveness-detection or ekyc-deepfake if you need that.

Request

SlotAccepted contentType
originalimage/jpeg, image/png
{
  "taskTypeId": "9",
  "inputs": [
    { "slotName": "original", "fileName": "portrait.jpg", "contentType": "image/jpeg", "sizeBytes": 262144 }
  ]
}

See Running a job for the full create, upload and finalize flow.

Limits

  • File size: up to the account upload limit, 10 MB by default.
  • The image must contain a detectable face. If none is found, the job fails and its credits are refunded.

Result

FieldTypeDescription
faceVectornumber[]The face embedding: 512 numbers, L2-normalized
dimensionintegerLength of faceVector; always 512
modelVersionstringVersion of the model that produced the result
{
  "faceVector": [0.0121, -0.0344, 0.0587, "…509 more values…"],
  "dimension": 512,
  "modelVersion": "v1"
}

Embeddings from different modelVersion values are not comparable. Re-generate your stored vectors when the version changes.

Output artifacts

kindFileDescription
resultresult.jsonThe embedding vector and its dimension

Cost and availability

  • Fixed price per job, set by your plan. The exact amount is returned as cost when you create the job. See Quotas & Credits.
  • Available on the cloud API; your plan decides which task types you can use.