POST /v1/segment
segmentSegment objects in an image from points, boxes or text prompts. Returns masks as COCO RLE. Models: list_models with endpoint "segment". Billed per call unless the key is a sandbox key.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"model": "<model>",
"image": "<image>"
},
"name": "segment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | ||
| boxes | No | ||
| image | Yes | base64 JPEG or PNG, optionally a data: URL; or an https:// URL of an image or video (fetched for you, up to 4 MB) | |
| model | Yes | Model id from GET /v1/models, e.g. provider/name | |
| points | No |