UNLOCK API

जटिल इमेज टास्क सॉल्विंग API

API को जटिल इमेज टास्क टास्क भेजें और वह जवाब पाएं जो आपका कोड पेज पर सबमिट करता है। class (recaptcha, hcaptcha, funcaptcha या recognition), इमेज और टास्क टेक्स्ट। आपको मिलता है: कौन सी इमेज या सेल मेल खाते हैं।

एक नज़र में

प्रति 1,000 कीमत
$0.60 ($0.0006 प्रति टास्क)
createTask type
ComplexImageTask
in.php method
आप भेजते हैं
class (recaptcha, hcaptcha, funcaptcha या recognition), इमेज और टास्क टेक्स्ट
आपको मिलता है
कौन सी इमेज या सेल मेल खाते हैं

वैल्यू कहां मिलेंगी

इमेज को एक सूची के रूप में और निर्देश को metadata में भेजें।

createTask और getTaskResult

टास्क बनाएं, लगभग 5 सेकंड इंतजार करें, फिर हर 5 सेकंड में रिजल्ट चेक करें जब तक स्टेटस 'ready' न हो जाए। अगर टास्क फेल होता है, तो API एक एरर देता है और चार्ज आपके क्रेडिट में वापस आ जाता है।

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")

पूरा API रेफरेंस: हर पैरामीटर और solution ऑब्जेक्ट