API Reference

Detect text in image

Detect text regions and return a mask. The returned mask can be used as input_mask in the Remove Text API, with optional manual modifications.

Model:remove-text
Credit:1
post/v1/images/detect-text

AuthorizationThis endpoint requires an API key. Pass it in the api-key header on every request. Learn more

Parameters

NameTypeStatusDescription
input_image
fileRequiredImage file or URL to detect text in.

Responses

Text mask generated successfullySimpleDetectionResponse

FieldTypeDescription
detectedbooleanWhether the target was detected
maskstringBase64-encoded RGBG mask. Null if nothing is detected. Pass as `input_mask` to the matching remove API.
curl -X POST "https://api.snapedit.app/v1/images/detect-text" \
  -H "api-key: YOUR_API_KEY" \
  -F "input_image=@./image.jpg"
Response
{
  "detected": true,
  "mask": "base64_encoded_data..."
}

Examples (1 example)

Input

Input 1

Output

Output