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
0person (người)
1bicycle (xe đạp)
2car (ô tô)
3motorcycle (xe máy)
4airplane (máy bay)
5bus (xe buýt)
6train (tàu hỏa)
7truck (xe tải)
8boat (thuyền)
9traffic light (đèn giao thông)
10fire hydrant (họng cứu hỏa)
11stop sign (biển báo dừng)
12parking meter (đồng hồ đỗ xe)
13bench (ghế dài)
14bird (chim)
15cat (mèo)
16dog (chó)
17horse (ngựa)
18sheep (cừu)
19cow (bò)
20elephant (voi)
21bear (gấu)
22zebra (ngựa vằn)
23giraffe (hươu cao cổ)
24backpack (ba lô)
25umbrella (ô/dù)
26handbag (túi xách)
27tie (cà vạt)
28suitcase (vali)
29frisbee (đĩa ném)
30skis (ván trượt tuyết)
31snowboard (ván trượt tuyết)
32sports ball (bóng thể thao)
33kite (diều)
34baseball bat (gậy bóng chày)
35baseball glove (găng tay bóng chày)
36skateboard (ván trượt)
37surfboard (ván lướt sóng)
38tennis racket (vợt tennis)
39bottle (chai)
40wine glass (ly rượu)
41cup (cốc)
42fork (nĩa)
43knife (dao)
44spoon (thìa)
45bowl (bát)
46banana (chuối)
47apple (táo)
48sandwich (bánh sandwich)
49orange (cam)
50broccoli (bông cải xanh)
51carrot (cà rốt)
52hot dog (xúc xích)
53pizza (bánh pizza)
54donut (bánh rán)
55cake (bánh ngọt)
56chair (ghế)
57couch (ghế sofa)
58potted plant (cây trồng trong chậu)
59bed (giường)
60dining table (bàn ăn)
61toilet (bồn cầu)
62tv (tivi)
63laptop (máy tính xách tay)
64mouse (chuột máy tính)
65remote (điều khiển từ xa)
66keyboard (bàn phím)
67cell phone (điện thoại di động)
68microwave (lò vi sóng)
69oven (lò nướng)
70toaster (máy nướng bánh)
71sink (bồn rửa)
72refrigerator (tủ lạnh)
73book (sách)
74clock (đồng hồ)
75vase (bình hoa)
76scissors (kéo)
77teddy bear (gấu bông)
78hair drier (máy sấy tóc)
79toothbrush (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ệ