> 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/extract/api-v1-selphid-extract-template-image.md).

# /api/v1/selphid/extract/template/image

Extracts the image contained in a facial template.

```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":{"ExtractTemplateImage":{"type":"object","description":"A raw template, used for image extraction.","properties":{"faceTemplate":{"$ref":"#/components/schemas/FacialTemplate"}},"required":["faceTemplate"]},"FacialTemplate":{"type":"string","description":"Biometric template buffer, obtained through GetFacialTemplate(), base64-encoded."},"ExtractionImageResult":{"type":"object","description":"The result of an image extraction operation.","properties":{"image":{"$ref":"#/components/schemas/ImageBuffer"}}},"ImageBuffer":{"type":"string","description":"Raw image buffer in .png, .jpg or .bmp format, base64-encoded."},"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/extract/template/image":{"post":{"description":"Extracts the image contained in a facial template.","tags":["Extract"],"requestBody":{"description":"JSON with the input template in base64 format.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractTemplateImage"}}}},"responses":{"200":{"description":"Result of the facial extraction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionImageResult"}}}},"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"}}}}}}}}}
```
