Bounding boxes for object detection AI model training
The method can be used to solve tasks where you need to select a specific object or draw a box around an object shown on an image.
Supported image formats: JPEG, PNG, GIF
Max file size: 600 kB
Max image size: 1000px on any side
BoundingBoxTask task type specification
Property | Type | Required | Description |
---|---|---|---|
type | String | Yes | BoundingBoxTask |
body | String | Yes | Image encoded into Base64 format. Data-URI format (containing data:content/type prefix) is also supported |
comment | String | Yes* | A comment will be shown to workers to help them to solve the captcha properly. The comment property is required if the imgInstructions property is missing. |
imgInstructions | String | Yes* | An optional image with instruction that will be shown to workers. Image should be encoded into Base64 format. Max file size: 100 kB. The imgInstructions property is required if the comment property is missing. |
Request example
Method: createTask
API endpoint: https://api.2captcha.com/createTask
{
"clientKey":"YOUR_API_KEY",
"task": {
"type":"BoundingBoxTask",
"body":"/9j/4AAQSkZJRgABAQAAAQ..HIAAAAAAQwAABtbnRyUkdCIFhZ.wc5GOGSRF//Z",
"comment":"draw a tight box around the green apple"
}
}
Response example
{
"errorId": 0,
"status": "ready",
"solution": {
"bounding_boxes": [
{
"xMin": 310,
"xMax": 385,
"yMin": 231,
"yMax": 308
}
]
},
"cost": "0.0012",
"ip": "1.2.3.4",
"createTime": 1692863536,
"endTime": 1692863556,
"solveCount": 1
}