biofrq.detect
Find faces in a single image. Returns bounding boxes and detector confidence. The cheapest building block — used on its own for crowd counts, and as the front half of every other action that needs to localize a face first.
Params
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
images[0] | ImageItem | yes | — | One image. See Envelope → Image inputs. |
maxFaces | int | no | unlimited | Cap the returned face count. Must be > 0. |
returnAlignedCrop | bool | no | false | Include a normalized 112×112 crop per face (base64 JPEG). Adds bytes; off by default. |
Request
json
{
"action": "biofrq.detect",
"params": {
"images": [
{
"kind": "image",
"bytes": "<base64>",
"contentType": "image/jpeg"
}
],
"maxFaces": 5,
"returnAlignedCrop": false
}
}
Response
json
{
"ok": true,
"requestId": "...",
"action": "biofrq.detect",
"data": {
"results": [
{
"index": 0,
"correlationId": "auto-0",
"ok": true,
"value": {
"faces": [
{
"faceBox": { "x": 142, "y": 87, "w": 218, "h": 218 },
"confidence": 0.992
}
]
}
}
]
},
"errors": []
}
An empty faces array is still a successful response — "no face
found" is a valid detection outcome and is billed.
Common errors
INVALID_REQUEST— missing or malformedparams.images[0],maxFaces≤ 0.PAYLOAD_TOO_LARGE— decoded image exceeds the size cap.