Skip to main content
Use this page to integrate Huemn from your server. You need permission to process every image you submit. Similarity is not identity proof or liveness; no embedding or biometric template is returned to your application.

1. Sign up and create a key

Open the dashboard, choose Sign in or create an account, and verify your email. Create or select an organization, then create or select an environment and processing purpose. Organization owners and admins can create environments. Eligible verified users may receive the configured $1 trial once; the dashboard reports eligibility and the actual balance. In API keys, choose Create API key. Select only the permissions your service needs and an expiry. Save the key directly into your server’s secret manager when it is shown once. Inject it at runtime as HUEMN_API_KEY; never include it in browser/mobile code, URLs or source control. Rotation immediately revokes the previous key. See accounts and permissions. The examples below assume a key with detection, comparison, collection creation/read/delete, face write/search/delete and operation-read permissions. Use narrower keys for production services.

2. Make your first call

The API base is https://api.huemn.com; requests use Authorization: Bearer <API key>. Pricing is public at GET https://api.huemn.com/v1/pricing. Start with an authorized JPEG or PNG no larger than 1 MiB. This command creates a local request file containing the image; keep it out of source control and logs and remove it after use.
A successful detection returns requestId, modelVersion and faces, each with a normalized boundingBox and confidence. No faces is a successful empty list. The quickstart explains image orientation and admission identities.

3. Create a collection and enroll

Use a collection per end customer or isolated dataset. Tenant, environment and purpose come from the key; metadata cannot override those boundaries.
Save the returned collection.id as COLLECTION_ID. Omitting retentionDays, or passing null, creates a collection whose faces persist until deleted unless an individual face has an expiry. To apply a retention period, pass a positive retentionDays. There is no product retention cap, but the value and resulting expiry must fit the supported integer and date ranges. The returned collection.retentionDays is null for a persistent collection. Prepare enroll.json, replacing every placeholder. Use a new non-nil UUID for faceId and retain it before sending:
subjectRef and consentRef are independently optional; omit them or pass null when unused. When supplied, keep them as opaque references of 1–256 characters without control characters, and retain the authorization evidence identified by consentRef in your own system. Omitting a reference does not remove your responsibility to have permission to process the image. expiresAt is optional. If omitted or null, a persistent collection keeps the face until deletion; a collection with a retention period computes its expiry from enrollment time. An explicit expiry must be a future RFC 3339 timestamp and cannot exceed a finite collection retention period. Responses use null expiresAt for faces without expiry and null subjectRef when no subject reference was supplied. Enrollment requires exactly one face. HTTP 202 with indexingState: "pending" means accepted for asynchronous indexing, not immediately searchable. Retain the exact request for a deliberate retry after an uncertain outcome. Reuse the same face ID and payload; changing them can create a conflict or a different enrollment. Remove local image-bearing files when your authorized retry workflow no longer needs them. Optional metadata is a flat string-to-string object: at most 50 keys, 40 characters per key and 500 per value. Keys use letters, digits, _, . or -. Do not include names, contact details, government identifiers, health or biometric data. Metadata is returned on enrollment, listing and search; it is not searchable, filterable or an authorization control.

4. Search and list faces

Prepare search.json with one query face:
Search returns matches, threshold, modelVersion and operatingPointVersion. Each match includes faceId, subjectRef, metadata and score. An empty result is valid, including while indexing is pending; never force a match. If your application checks again, use a bounded delay and deadline and account for each new successful search being billable. Listing returns records and nextCursor. When the cursor is non-null, pass it as after for the next page. Limits are 1–100; pagination is a live view. Listing does not expose images or templates.

5. Compare two images

Prepare compare.json with exactly one face in each image:
Read the returned match, score, threshold, modelVersion and operatingPointVersion. Huemn uses a cosine score, not a probability. The default threshold is inherited and uncalibrated; see operating-point details and evaluation guidance before making consequential decisions.

6. Delete data

Delete a face using its saved ID:
HTTP 202 deletion_pending suppresses authoritative visibility and schedules erasure. It has no operation ID and is not proof of physical purge. To remove the collection, call DELETE /v1/collections/{collectionId}, save operation.id, and inspect GET /v1/operations/{operationId} until completed or failed, with bounded polling. Pending/running states do not establish completion. For deletion across collections, face lifecycle documents subject erasure and consent withdrawal, their scopes and the required erasure idempotency key. Reads and authorized deletion do not require inference credits, including at zero balance.

Errors and retries

Errors include a safe error.code, error.message and error.requestId. Keep request IDs for support without logging image bodies, keys, subject references or biometric results. An optional Idempotency-Key on image operations deduplicates accounting; it does not replay inference results. An identical admitted retry can return 409 ADMISSION_ALREADY_EXISTS with accounting status. See retry semantics before enabling retries.

SDKs, limits and pricing

TypeScript SDK source is in huemn-web/packages/api-client; Python source is in huemn-backend-services/sdk/python. These repositories are private; there is no public npm/PyPI installation step in this guide. Use the HTTP examples above to integrate without SDK access. Both SDKs default to https://api.huemn.com, validate responses, use bounded deadlines and avoid automatic retries. If you have SDK source access, reuse a client. TypeScript prepareImage and Python prepare_image choose inline data or a private upload reference. Images over 1 MiB require that reference flow. See SDK examples. JPEG/PNG only: at most 5 MiB decoded per image, 8192 pixels per side and 20 million pixels. Inline base64 has no data-URL prefix. Do not submit arbitrary remote URLs. Compare, enrollment and search require one face per image. Only successful image operations are charged. Failed requests, reads and deletion are free. Check the pricing page and the public pricing API for current operation rates and tiers. A checkout return does not prove settlement; use the dashboard’s authoritative billing status.

Face storage pricing

Planned price: $0.01 per 1,000 stored face-months, prorated. Storage billing is not active; no storage credits are deducted yet. Catalog version: 2026-12-02-storage-preview-1. See the pricing page for request tiers.