API Documentation
RecaptchaV3
POST /createTask
Tạo một task mới để giải RecaptchaV3.
Request
curl -X POST https://viecap.com/api/createTask \
-H "Content-Type: application/json" \
-d '{
"clientKey": "vcapi_apicuaban123",
"task": {
"type": "RecaptchaV3TaskProxyless",
"websiteURL": "https://example.com",
"websiteKey": "6Lc_aCMTAAAAABx7u2W0WPXnVbI_v6ZdbM6rYf16"
}
}'
Response
{
"taskId": 123456,
"error_code": 0,
"status": "success",
"balance": 49940
}
POST /getTaskResult
Lấy kết quả của task RecaptchaV3.
Request
curl -X POST https://viecap.com/api/getTaskResult \
-H "Content-Type: application/json" \
-d '{
"clientKey": "vcapi_apicuaban123",
"taskId": "123456"
}'
Response
{
"status": "ready",
"solution": {
"gRecaptchaResponse": "03AGdBq24PBCbwiDRaS_MJ..."
},
"error_code": 0
}
Image to Text 1
POST /createTask
Tạo một task mới để giải Image to Text loại 1 (Giải thường).
Request
curl -X POST https://viecap.com/api/createTask \
-H "Content-Type: application/json" \
-d '{
"clientKey": "vcapi_apicuaban123",
"task": {
"type": "imagetotext",
"body": "base64_encoded_image_data"
}
}'
Response
{
"taskId": 123456,
"error_code": 0,
"status": "success",
"balance": 49950
}
POST /getTaskResult
Lấy kết quả của task Image to Text 1.
Request
curl -X POST https://viecap.com/api/getTaskResult \
-H "Content-Type: application/json" \
-d '{
"clientKey": "vcapi_apicuaban123",
"taskId": "123456"
}'
Response
{
"status": "ready",
"solution": {
"text": "ABCD123"
},
"error_code": 0
}
Image to Text 2
POST /createTask
Tạo một task mới để giải Image to Text loại 2 (Giải nhanh).
Request
curl -X POST https://viecap.com/api/createTask \
-H "Content-Type: application/json" \
-d '{
"clientKey": "vcapi_apicuaban123",
"task": {
"type": "imagetotext",
"body": "base64_encoded_image_data",
"mode": "fast"
}
}'
Response
{
"taskId": 123456,
"error_code": 0,
"status": "success",
"balance": 49950
}
POST /getTaskResult
Lấy kết quả của task Image to Text 2.
Request
curl -X POST https://viecap.com/api/getTaskResult \
-H "Content-Type: application/json" \
-d '{
"clientKey": "vcapi_apicuaban123",
"taskId": "123456"
}'
Response
{
"status": "ready",
"solution": {
"text": "ABCD123"
},
"error_code": 0
}
OCR
POST /createTask
Tạo một task mới để nhận dạng văn bản từ ảnh (OCR).
Request
curl -X POST https://viecap.com/api/createTask \
-H "Content-Type: application/json" \
-d '{
"clientKey": "vcapi_apicuaban123",
"task": {
"type": "ocr",
"body": "base64_encoded_image_data",
}
}'
Response
{
"taskId": 123456,
"error_code": 0,
"status": "success",
"balance": 49950
}
POST /getTaskResult
Lấy kết quả của task OCR.
Request
curl -X POST https://viecap.com/api/getTaskResult \
-H "Content-Type: application/json" \
-d '{
"clientKey": "vcapi_apicuaban123",
"taskId": "123456"
}'
Response
{
"status": "ready",
"solution": {
"text": "This is a sample text extracted from the image..."
},
"error_code": 0
}
Geetest
POST /createTask
Tạo một task mới để giải Geetest captcha.
Request
curl -X POST https://viecap.com/api/createTask \
-H "Content-Type: application/json" \
-d '{
"clientKey": "vcapi_apicuaban123",
"task": {
"type": "geetest",
"body": "base64_encoded_image_data"
}
}'
Response
{
"taskId": 123456,
"error_code": 0,
"status": "success",
"balance": 49940
}
POST /getTaskResult
Lấy kết quả của task Geetest.
Request
curl -X POST https://viecap.com/api/getTaskResult \
-H "Content-Type: application/json" \
-d '{
"clientKey": "vcapi_apicuaban123",
"taskId": "123456"
}'
Response
{
"status": "ready",
"solution": {
"challenge": "12345678901234567890",
"validate": "abcdef1234567890",
"seccode": "abcdef1234567890|jordan"
},
"error_code": 0
}
Multi-Object Detection
POST /createTask
Tạo một task mới để Multi-Object Detection trong ảnh.
Request
curl -X POST https://viecap.com/api/createTask \
-H "Content-Type: application/json" \
-d '{
"clientKey": "vcapi_apicuaban123",
"task": {
"type": "multi_od",
"body": "base64_encoded_image_data"
}
}'
Response
{
"taskId": 123456,
"error_code": 0,
"status": "success",
"balance": 49950
}
POST /getTaskResult
Lấy kết quả của task Multi-Object Detection.
Request
curl -X POST https://viecap.com/api/getTaskResult \
-H "Content-Type: application/json" \
-d '{
"clientKey": "vcapi_apicuaban123",
"taskId": "123456"
}'
Response
{
"status": "ready",
"solution": {
"detection_data": [
{
"obj_detection": "dog",
"confidence": 0.98,
"box_coords_absolute": [100, 200, 300, 400],
"distance_from_left_edge_px": 0,
"distance_from_top_edge_py": 214,
"box_dimensions_relative_to_itself": {
"width": 234,
"height": 168
}
}
],
"demo" : "base64_encoded_image_data"
},
"error_code": 0
}
Danh sách các lớp đối tượng
| ID | Tên lớp |
|---|---|
| 0 | person (người) |
| 1 | bicycle (xe đạp) |
| 2 | car (ô tô) |
| 3 | motorcycle (xe máy) |
| 4 | airplane (máy bay) |
| 5 | bus (xe buýt) |
| 6 | train (tàu hỏa) |
| 7 | truck (xe tải) |
| 8 | boat (thuyền) |
| 9 | traffic light (đèn giao thông) |
| 10 | fire hydrant (họng cứu hỏa) |
| 11 | stop sign (biển báo dừng) |
| 12 | parking meter (đồng hồ đỗ xe) |
| 13 | bench (ghế dài) |
| 14 | bird (chim) |
| 15 | cat (mèo) |
| 16 | dog (chó) |
| 17 | horse (ngựa) |
| 18 | sheep (cừu) |
| 19 | cow (bò) |
| 20 | elephant (voi) |
| 21 | bear (gấu) |
| 22 | zebra (ngựa vằn) |
| 23 | giraffe (hươu cao cổ) |
| 24 | backpack (ba lô) |
| 25 | umbrella (ô/dù) |
| 26 | handbag (túi xách) |
| 27 | tie (cà vạt) |
| 28 | suitcase (vali) |
| 29 | frisbee (đĩa ném) |
| 30 | skis (ván trượt tuyết) |
| 31 | snowboard (ván trượt tuyết) |
| 32 | sports ball (bóng thể thao) |
| 33 | kite (diều) |
| 34 | baseball bat (gậy bóng chày) |
| 35 | baseball glove (găng tay bóng chày) |
| 36 | skateboard (ván trượt) |
| 37 | surfboard (ván lướt sóng) |
| 38 | tennis racket (vợt tennis) |
| 39 | bottle (chai) |
| 40 | wine glass (ly rượu) |
| 41 | cup (cốc) |
| 42 | fork (nĩa) |
| 43 | knife (dao) |
| 44 | spoon (thìa) |
| 45 | bowl (bát) |
| 46 | banana (chuối) |
| 47 | apple (táo) |
| 48 | sandwich (bánh sandwich) |
| 49 | orange (cam) |
| 50 | broccoli (bông cải xanh) |
| 51 | carrot (cà rốt) |
| 52 | hot dog (xúc xích) |
| 53 | pizza (bánh pizza) |
| 54 | donut (bánh rán) |
| 55 | cake (bánh ngọt) |
| 56 | chair (ghế) |
| 57 | couch (ghế sofa) |
| 58 | potted plant (cây trồng trong chậu) |
| 59 | bed (giường) |
| 60 | dining table (bàn ăn) |
| 61 | toilet (bồn cầu) |
| 62 | tv (tivi) |
| 63 | laptop (máy tính xách tay) |
| 64 | mouse (chuột máy tính) |
| 65 | remote (điều khiển từ xa) |
| 66 | keyboard (bàn phím) |
| 67 | cell phone (điện thoại di động) |
| 68 | microwave (lò vi sóng) |
| 69 | oven (lò nướng) |
| 70 | toaster (máy nướng bánh) |
| 71 | sink (bồn rửa) |
| 72 | refrigerator (tủ lạnh) |
| 73 | book (sách) |
| 74 | clock (đồng hồ) |
| 75 | vase (bình hoa) |
| 76 | scissors (kéo) |
| 77 | teddy bear (gấu bông) |
| 78 | hair drier (máy sấy tóc) |
| 79 | toothbrush (bàn chải đánh răng) |
Error Codes
| Code | Description |
|---|---|
| 0 | Thành công |
| 1 | Lỗi xác thực clientKey |
| 2 | TaskId không tồn tại |
| 3 | Số dư không đủ |
| 4 | Task type không hợp lệ |
| 5 | Worker quá tải |
| 6 | ClientKey không hợp lệ |