> For the complete documentation index, see [llms.txt](https://docs.facephi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.facephi.com/docs.facephi-pt-br/sdks/backend-sdk/selphid/technical_documentation/api_reference/gallery-1-n/api-v1-selphid-identify-galleryid.md).

# /api/v1/selphid/identify/{galleryId}

Searches a gallery for a facial template obtained from an image.

```json
{"openapi":"3.0.0","info":{"title":"SelphID-SDK Rest API","version":"6.21.0"},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Default API key header name. It can be overridden at startup with `auth_api_key_header_name`."}},"schemas":{"GalleryId":{"type":"string","description":"The name of a facial template gallery."},"IdentifyImage":{"type":"object","description":"A raw image, used for searching a 1:N gallery.","properties":{"image":{"$ref":"#/components/schemas/ImageBuffer"},"options":{"$ref":"#/components/schemas/SdkOptions"}},"required":["image"]},"ImageBuffer":{"type":"string","description":"Raw image buffer in .png, .jpg or .bmp format, base64-encoded."},"SdkOptions":{"type":"object","description":"Options to customize the use of the extraction and identification engines. Their use is optional and no option is mandatory. If omitted, the default values are used.","properties":{"longDetail":{"$ref":"#/components/schemas/LongDetail"},"elapsedAllowedSeconds":{"$ref":"#/components/schemas/ElapsedSeconds"},"futureAllowedSeconds":{"$ref":"#/components/schemas/FutureSeconds"},"facialDetection":{"$ref":"#/components/schemas/FacialDetectionType"},"minFaceAbsPx":{"$ref":"#/components/schemas/MinFaceSize"},"minFaceRel":{"$ref":"#/components/schemas/MinFaceRel"},"minIodPx":{"$ref":"#/components/schemas/MinIOD"},"maxPoseDegrees":{"$ref":"#/components/schemas/MaxPoseDegrees"},"minFacialQuality":{"$ref":"#/components/schemas/FacialQuality"},"analyticsDetection":{"$ref":"#/components/schemas/Analytics"},"templateRawExtraction":{"$ref":"#/components/schemas/TemplateRawExtraction"},"falseDetectRate":{"$ref":"#/components/schemas/FalseDetectRate"},"maxCantidates":{"$ref":"#/components/schemas/MaxCandidates"},"minSimilarity":{"$ref":"#/components/schemas/MinSimilarity"},"authThreshold":{"$ref":"#/components/schemas/AuthThreshold"},"livenessDepth":{"$ref":"#/components/schemas/LivenessDepth"}}},"LongDetail":{"type":"boolean","description":"If true, the endpoint result will include additional information. If omitted, the default value is false."},"ElapsedSeconds":{"type":"integer","description":"Maximum lifetime of a templateRaw (in seconds) to be considered valid in authentication or liveness operations. If 0 (default), there is no limit.","minimum":0},"FutureSeconds":{"type":"integer","description":"Maximum future lifetime of a templateRaw (in seconds) to be considered valid in authentication or liveness operations. The template may have been created on a device with a date in the future relative to the device that consumes it. If 0 (default), no templateRaw with a future date is accepted.","minimum":0},"FacialDetectionType":{"type":"string","description":"Facial detection types in the extraction engine.","enum":["Frontal","FrontalFast"]},"MinFaceSize":{"type":"integer","description":"Minimum size, in pixels, that a face must have to be detected."},"MinFaceRel":{"type":"number","description":"Minimum size, relative to the image size, that a face must have to be detected.","minimum":0,"maximum":1},"MinIOD":{"type":"integer","description":"Minimum interocular distance, in pixels, that a face must have to be detected."},"MaxPoseDegrees":{"type":"number","description":"Maximum angle difference (in degrees) between two poses to be considered valid in authentication processes.","minimum":0,"maximum":180},"FacialQuality":{"type":"string","description":"A metric indicating how accurately a template will perform in recognition.","enum":["None","Bad","Regular","Good"]},"Analytics":{"type":"boolean","description":"Gets additional analytics in the extraction engine."},"TemplateRawExtraction":{"type":"boolean","description":"The extraction engine will generate the raw template."},"FalseDetectRate":{"type":"number","description":"False rejection tolerance level in the extraction engine. Using this value is not recommended unless you are sure of its effects.","minimum":0,"maximum":1},"MaxCandidates":{"type":"integer","description":"Maximum number of candidates required in 1:N searches."},"MinSimilarity":{"type":"number","description":"Minimum tolerable similarity in 1:N searches.","minimum":0,"maximum":1},"AuthThreshold":{"type":"number","description":"Minimum value in an authentication for it to be considered positive.","minimum":0,"maximum":100},"LivenessDepth":{"type":"string","description":"Which liveness pipelines must be used.","enum":["None","Partial","Full"]},"SearchResult":{"type":"object","description":"The result of searching for a template in a gallery.","properties":{"galleryIndex":{"$ref":"#/components/schemas/GalleryIndex"},"templateId":{"$ref":"#/components/schemas/FacialTemplateId"},"similarity":{"$ref":"#/components/schemas/Similarity"},"facialAuthenticationStatus":{"$ref":"#/components/schemas/FacialAuthenticationStatus"},"facialAuthenticationDetail":{"$ref":"#/components/schemas/FacialAuthenticationDetail"},"sdkDuration":{"$ref":"#/components/schemas/SdkDuration"}}},"GalleryIndex":{"type":"integer","description":"The index of a facial template in a gallery.","minimum":0},"FacialTemplateId":{"type":"string","description":"The name of a facial template in a gallery."},"Similarity":{"type":"number","description":"Similarity between two facial templates (0-None, 1-Identical)."},"FacialAuthenticationStatus":{"type":"string","description":"Possible results of an authentication operation.","enum":["None","Negative","Uncertain","Positive","NoneBecausePoseExceed","NoneBecauseInvalidExtractions"]},"FacialAuthenticationDetail":{"type":"string","description":"Quality detail of an authentication operation.","enum":["None","PositiveLowSecurityLevel","PositiveMediumSecurityLevel","PositiveHighSecurityLevel"]},"SdkDuration":{"type":"number","description":"Duration of the operation in milliseconds."},"BadRequestResult":{"type":"object","description":"Result when incorrect parameters arrive in the request.","properties":{"status":{"type":"number"},"error":{"type":"string"},"timeStamp":{"$ref":"#/components/schemas/TimeStamp"}}},"TimeStamp":{"type":"string","description":"A date and time value in \"%Y-%m-%dT%H:%M:%SZ\" format."},"ExceptionResult":{"type":"object","description":"An error occurred in the call to the SelphID-SDK backend.","properties":{"status":{"type":"number"},"error":{"type":"string"},"exception":{"type":"string"},"timeStamp":{"$ref":"#/components/schemas/TimeStamp"}}}}},"paths":{"/api/v1/selphid/identify/{galleryId}":{"post":{"description":"Searches a gallery for a facial template obtained from an image.","tags":["Gallery 1:n"],"parameters":[{"in":"path","name":"galleryId","schema":{"$ref":"#/components/schemas/GalleryId"},"required":true}],"requestBody":{"description":"JSON with the image data used in the search.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentifyImage"}}}},"responses":{"200":{"description":"An array of templates that match the input image.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SearchResult"}}}}},"400":{"description":"Incorrect parameters in the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResult"}}}},"500":{"description":"An error occurred in the call to the SelphID-SDK backend.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResult"}}}}}}}}}
```
