Appearance
Photo Enhance API
Improve the visual quality of an image and optionally enhance its face region. This endpoint can help with moderate softness, noise, or insufficient resolution, but it cannot recover details that are completely absent from the source.
Photo enhancement does not crop an image to a document specification or determine whether it satisfies passport-photo requirements. Use the Passport Photo API for that workflow.
API endpoint
https://api-us.idphotoapp.com— US regionhttps://api-eu.idphotoapp.com— EU region
http
POST /v2/photoEnhanceRequest
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
apiKey | string | Yes | — | Your API key. |
apiSecret | string | Yes | — | Your API secret. |
imageBase64 | string | Yes | — | Base64 image data, with or without a data URI prefix. |
scaleFactor | integer | No | 1 | Requested image scaling factor. |
enableFaceEnhance | boolean | No | false | Enables additional processing for the face region. |
outputFormat | string | No | JPEG | JPEG or PNG. |
outputType | string | No | IMAGE_BASE64 | Output representation. |
json
{
"apiKey": "your-api-key",
"apiSecret": "your-api-secret",
"imageBase64": "data:image/jpeg;base64,...",
"scaleFactor": 2,
"enableFaceEnhance": true,
"outputFormat": "JPEG",
"outputType": "IMAGE_BASE64"
}Response
json
{
"output": "/9j/4AAQSkZJRgABAQ..."
}The output field contains the enhanced image as Base64 without a data URI prefix.
Usage notes
- Start with the lowest scale factor that meets your output-size requirement.
- Face enhancement may change small image details. Review the result before using it in an identity-sensitive workflow.
- Severely blurred, overexposed, underexposed, or very small faces may not contain enough information to restore.
- Keep credentials on your server and avoid logging full image payloads.
