UNLOCK API
जटिल इमेज टास्क

जटिल इमेज टास्क

createTask या in.php से UNLOCK API को जटिल इमेज टास्क टास्क कैसे भेजें: टास्क टाइप के नाम, हर पैरामीटर, solution ऑब्जेक्ट, proxy फील्ड और 7 भाषाओं में कोड उदाहरण।
कीमत
$0.60 $0.0006 प्रति टास्क
आप भेजते हैं
class (recaptcha, hcaptcha, funcaptcha या recognition), इमेज और टास्क टेक्स्ट
आपको मिलता है
कौन सी इमेज या सेल मेल खाते हैं

ओवरव्यू और कीमत

टास्क टाइप के नाम

इस टाइप का एक ही नाम है।
ComplexImageTask

टास्क ऑब्जेक्ट

type
Stringज़रूरी
टास्क टाइप का नाम। किसी भी letter case में मिलाया जाता है। ComplexImageTask
class
Stringज़रूरी
यह कौन सा इमेज challenge है, जैसे recaptcha या hcaptcha।
imagesBase64
Arrayज़रूरी
इमेज, base64 स्ट्रिंग की सूची के रूप में।
metadata
Objectवैकल्पिक
सवाल और लेआउट, जैसे Task और Grid।

जो फील्ड यहां नहीं दिए गए, वे जैसे भेजे गए वैसे ही सॉल्वर को दिए जाते हैं।

रिक्वेस्ट

POST /createTask
{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "ComplexImageTask",
    "class": "recaptcha",
    "imagesBase64": [
      "/9j/4AAQSkZJRgABAQ..."
    ],
    "metadata": {
      "Task": "Select all images with a bus",
      "Grid": "3x3"
    }
  }
}

Solution ऑब्जेक्ट

status ready होने पर solution में लौटाया जाता है।
answer
Array
सबमिट करने वाला जवाब।
POST /getTaskResult
{
  "errorId": 0,
  "taskId": 1001,
  "status": "ready",
  "solution": {
    "answer": [
      false,
      true,
      false,
      false,
      true,
      false,
      false,
      false,
      true
    ]
  },
  "cost": "0.0006",
  "createTime": 1791640000,
  "endTime": 1791640014,
  "solveCount": 1
}

कोड उदाहरण

import time, requests

API = "https://unlock-api.com"
KEY = "YOUR_API_KEY"

task = requests.post(f"{API}/createTask", json={
    "clientKey": KEY,
    "task": {
      "type": "ComplexImageTask",
      "class": "recaptcha",
      "imagesBase64": [
        "/9j/4AAQSkZJRgABAQ..."
      ],
      "metadata": {
        "Task": "Select all images with a bus",
        "Grid": "3x3"
      }
    }
}).json()
if task["errorId"]:
    raise SystemExit(task["errorCode"])

for _ in range(60):   # 60 x 5 s = the 5 minute task limit
    time.sleep(5)
    r = requests.post(f"{API}/getTaskResult", json={"clientKey": KEY, "taskId": task["taskId"]}).json()
    if r["errorId"]:
        raise SystemExit(f"{r['errorCode']}: {r.get('errorDescription', '')}")   # failed tasks are refunded
    if r["status"] == "ready":
        print(r["solution"])
        break
else:
    raise SystemExit("timed out")

in.php फॉर्म मेथड

यह टाइप सिर्फ JSON मेथड से उपलब्ध है।