Face Embeddings API
The face embeddings endpoint converts a face image into a 512-dimension numeric vector. Similar faces produce vectors that are numerically close; dissimilar faces produce vectors that are far apart. Store embeddings in your own database and compare them however you like.
Data Returned
- Embedding vector — A 512-dimension float array representing the face. Deterministic for the same face across calls.
- Stable identifier (hash) — A content-based hash for the face payload, useful as a cache key.
Embeddings vs. the Face Gallery
Use embeddings when you want to own your storage and matching logic — store vectors in Postgres, Pinecone, pgvector, or any vector DB and run similarity search yourself. Use the Face Gallery when you want Mental Edge to manage enrollment, storage, and similarity search for you. Both are valid approaches; embeddings give you more flexibility, the gallery gives you less infrastructure to maintain.
Common Use Cases
- Custom face recognition — detect, embed, store, compare, and identify people across photos or video frames.
- Deduplication — deduplicate user profile photos or submitted images by comparing embeddings above a similarity threshold.
- Clustering — group faces by identity across a large image dataset without labeled training data.
Priced at the Face Detection rate ($0.001/image) in production. Free sandbox available.
Face Gallery (managed recognition) | API Pricing | Developer API overview