API Reference
Generate masks for an image
POST
/
v1
/
images
/
mask-generation
Generate masks for an image
curl --request POST \
--url https://api.synapsai.cloud/v1/images/mask-generation \
--header 'Content-Type: application/json' \
--data '
{
"image": "<string>",
"mask_threshold": 0,
"pred_iou_thresh": 0.88,
"stability_score_thresh": 0.95,
"stability_score_offset": 1,
"crops_nms_thresh": 0.7,
"crops_n_layers": 0,
"crop_overlap_ratio": 0.3413,
"crop_n_points_downscale_factor": 1,
"timeout": 123
}
'import requests
url = "https://api.synapsai.cloud/v1/images/mask-generation"
payload = {
"image": "<string>",
"mask_threshold": 0,
"pred_iou_thresh": 0.88,
"stability_score_thresh": 0.95,
"stability_score_offset": 1,
"crops_nms_thresh": 0.7,
"crops_n_layers": 0,
"crop_overlap_ratio": 0.3413,
"crop_n_points_downscale_factor": 1,
"timeout": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)[
"<string>"
]Body
application/json
Request parameters for mask generation tasks (e.g., segmentation proposals).
Response
200 - application/json
Masks
mask in base64 or URL
⌘I
Generate masks for an image
curl --request POST \
--url https://api.synapsai.cloud/v1/images/mask-generation \
--header 'Content-Type: application/json' \
--data '
{
"image": "<string>",
"mask_threshold": 0,
"pred_iou_thresh": 0.88,
"stability_score_thresh": 0.95,
"stability_score_offset": 1,
"crops_nms_thresh": 0.7,
"crops_n_layers": 0,
"crop_overlap_ratio": 0.3413,
"crop_n_points_downscale_factor": 1,
"timeout": 123
}
'import requests
url = "https://api.synapsai.cloud/v1/images/mask-generation"
payload = {
"image": "<string>",
"mask_threshold": 0,
"pred_iou_thresh": 0.88,
"stability_score_thresh": 0.95,
"stability_score_offset": 1,
"crops_nms_thresh": 0.7,
"crops_n_layers": 0,
"crop_overlap_ratio": 0.3413,
"crop_n_points_downscale_factor": 1,
"timeout": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)[
"<string>"
]