✨ NoCaptcha v2 is here — fresh look, API v2 & agentic solving.Read the changelog →
Image Tasks

BLS Captcha

Solve BLS / Morocco OCR captchas with the NoCaptchaAI API.

Create a task

POST https://api.nocaptchaai.com/createTask

{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "ImageToTextTask",
    "images": [
      "base64-image-0",
      "...",
      "base64-image-8"
    ],
    "numeric": true,
    "module": "morocco",
    "case": false,
    "maxLength": 3
  }
}

Get the result

// Array form — one text per input image:
{ "errorId": 0, "solution": { "text": ["234", "567", "...", "982"] } }

// Object form — index → text:
{ "errorId": 0, "solution": { "text": { "0": "234", "1": "567" } } }
  • The script reads a target number from the page and clicks the image(s) whose recognized text matches it.

Code example

import requests
API_KEY = "YOUR_API_KEY"; BASE = "https://api.nocaptchaai.com"
res = requests.post(f"{BASE}/createTask", json={
    "clientKey": API_KEY,
    "task": {
        "type": "ImageToTextTask",
        "images": ["base64-image-0", "base64-image-1", "..."],
        "numeric": True,
        "module": "morocco",
        "case": False,
        "maxLength": 3
    }
}).json()
print(res)
const API_KEY = "YOUR_API_KEY", BASE = "https://api.nocaptchaai.com";
const res = await fetch(`${BASE}/createTask`, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    clientKey: API_KEY,
    task: {
      type: "ImageToTextTask",
      images: ["base64-image-0", "base64-image-1", "..."],
      numeric: true,
      module: "morocco",
      case: false,
      maxLength: 3
    }
  })
}).then(r => r.json());
console.log(res);
curl -X POST https://api.nocaptchaai.com/createTask \
  -H "Content-Type: application/json" \
  -d '{
    "clientKey": "YOUR_API_KEY",
    "task": {
      "type": "ImageToTextTask",
      "images": ["base64-image-0", "base64-image-1"],
      "numeric": true,
      "module": "morocco",
      "case": false,
      "maxLength": 3
    }
  }'

Next steps

On this page

Content-Length: 0