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.

API Reference

Six REST endpoints. Every endpoint documented with a runnable curl example.

Operations

Production-readiness: rate limits, error handling, webhooks, idempotency.

Endpoint reference

Base URL: https://api.latentface.net

POST/v1/embed

Extract 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"
POST/v1/swap

Swap 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"
POST/v1/match

Cosine-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"
POST/v1/enhance

Upscale 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"
POST/v1/blend

Blend 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]"
GET/v1/usage

Return 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.