DOCUMENTATION
Latentface API docs
Everything you need to ship a face model into production: quickstart, SDKs, endpoint reference, rate limits, and webhooks.
Quickstart
Get an API key, install an SDK, and ship your first call in under 3 minutes.
SDKs
First-party libraries with matching call surfaces for Python and TypeScript.
- Python SDKpip install latentface
- TypeScript SDKnpm install @latentface/sdk
API Reference
Six REST endpoints. Every endpoint documented with a runnable curl example.
- POST /v1/embedFace embedding
- POST /v1/swapFace swap
- POST /v1/matchSimilarity
- POST /v1/enhanceUpscale & restore
- POST /v1/blendN→1 blend
- GET /v1/usageUsage metrics
Operations
Production-readiness: rate limits, error handling, webhooks, idempotency.
Endpoint reference
Base URL: https://api.latentface.net
/v1/embedExtract a 512-dim face embedding from an image. Use for similarity, dedup, or verification.
curl https://api.latentface.net/v1/embed \
-H "Authorization: Bearer $LATENTFACE_API_KEY" \
-F "image=@face.jpg"/v1/swapSwap the face from a source image onto a target. Returns a PNG stream or an S3 URL.
curl https://api.latentface.net/v1/swap \
-H "Authorization: Bearer $LATENTFACE_API_KEY" \
-F "source=@source.jpg" \
-F "target=@target.jpg"/v1/matchCosine-similarity match between two embeddings or two images. Returns a 0–1 score.
curl https://api.latentface.net/v1/match \
-H "Authorization: Bearer $LATENTFACE_API_KEY" \
-F "a=@a.jpg" -F "b=@b.jpg"/v1/enhanceUpscale and restore compressed or low-resolution face crops.
curl https://api.latentface.net/v1/enhance \
-H "Authorization: Bearer $LATENTFACE_API_KEY" \
-F "image=@lowres.jpg"/v1/blendBlend N source faces into a single synthetic identity with tunable weights.
curl https://api.latentface.net/v1/blend \
-H "Authorization: Bearer $LATENTFACE_API_KEY" \
-F "faces[]=@a.jpg" -F "faces[]=@b.jpg" -F "weights=[0.6,0.4]"/v1/usageReturn per-key call counts, error rates, p50/p95 latency, and current-cycle spend.
curl https://api.latentface.net/v1/usage \
-H "Authorization: Bearer $LATENTFACE_API_KEY"Ready to ship?
Free tier: 100 calls/day, all six endpoints, no credit card. Upgrade when you want to remove watermarks and unlock priority queue.