SnapEditDocs
API Reference

Detect wires/lines in image

remove-wireline

Detect wire, cable, and line regions and return a mask. The returned mask can be used as input_mask in the Remove Wires API, with optional manual modifications.

post/v1/images/detect-wires

Credit cost: 1

AuthorizationThis 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 wires in.

Responses

Wire 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-wires" \
  -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