SnapEditDocs
API HomeGet API Key
API Reference

Detect text in image

remove-text

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.

post/v1/images/detect-text

Credit cost: 1

Authorization β€” This endpoint requires an API key. Pass it in the api-key header on every request. See the quickstart

Body

NameTypeStatusDescription
input_image
fileRequiredImage file or URL to detect text in.

Responses

Text mask generated successfullySimpleDetectionResponse

NameTypeDescription
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.snapapi.ai/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