Skip to content

POST /face/search

The POST /face/search endpoint forwards image payloads to Brookmimir’s facial recognition service. Each validated request deducts one credit before the proxy forwards the payload.

  • Method: POST
  • Path: /face/search
  • Authentication: Required (x-api-key header)
  • Headers:
    • x-api-key — Required. Your Brookmimir credential.
    • Content-Type: application/json
    • Optional accept: application/json
Terminal window
set BASE64 $(cat ./image.b64)
curl -X POST http://api.brookmimir.com/face/search \
-H "Content-Type: application/json" \
-H "x-api-key: 1234567890" \
-d "{\"image_base64\":\"$BASE64\",\"top_k\":5}"

The request body is a JSON object whose structure depends on your biometric workflow. Brookmimir permits additional keys and nested objects so you can tailor the payload to the downstream recognition engine.

FieldTypeRequiredDescription
image_b64stringYesBase64-encoded image data
x-api-keystringYesx-api-key
top_kintegerNoNumber of top results to return. Limit is 10
  • HTTP status: 200 OK
{
"status": 200,
"matches": [
{
"doc_id": "DOC-4411992",
"confidence": 0.91,
"face_file": "https://assets.brookmimir.com/matches/4411992.jpg",
"attributes": {
"
}
},
{
"doc_id": "DOC-3378510",
"confidence": 0.84,
"face_file": "https://assets.brookmimir.com/matches/3378510.jpg"
}
],
}
StatusScenarioResponse schemaGuidance
400Missing headers or malformed body.StatusMessageEnsure the JSON payload and required fields are present before retrying.
401/403Authentication failure.StatusMessageVerify credentials, transmit over TLS, and rotate keys regularly.
402Credit balance depleted.StatusMessageRefill credits or pause billable calls before retrying.
404Token or resource not found.StatusMessageConfirm the API key is active and the requested resource exists.
5xxDownstream engine or platform disruption.StatusMessageRetry with exponential backoff, capture request identifiers, and alert Brookmimir support.
{
"status": 400,
"message": "Body must include 'image_b64'."
}
  1. Secure image transport: Host probe images on HTTPS endpoints or use image_b64 to avoid unauthorized interception.
  2. Tune thresholds: Start with the service default, then adjust threshold and max_results based on match quality and false-positive tolerance.
  3. Log audits: Record request metadata (excluding sensitive image data) and response confidences to satisfy governance requirements.
  4. Pair with /credits: Large-scale biometric searches may consume more credits; monitor balance before launching batch operations.
  5. Fallback logic: Gracefully handle empty matches arrays by triggering manual review or alternate identification workflows.

By following these guidelines, you can embed Brookmimir’s biometric intelligence into investigative pipelines while maintaining observability, compliance, and user trust.