Skip to content

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 region
  • https://api-eu.idphotoapp.com — EU region
http
POST /v2/photoEnhance

Request ​

FieldTypeRequiredDefaultDescription
apiKeystringYes—Your API key.
apiSecretstringYes—Your API secret.
imageBase64stringYes—Base64 image data, with or without a data URI prefix.
scaleFactorintegerNo1Requested image scaling factor.
enableFaceEnhancebooleanNofalseEnables additional processing for the face region.
outputFormatstringNoJPEGJPEG or PNG.
outputTypestringNoIMAGE_BASE64Output 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.