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

Quickstart

Solve your first captcha with the NoCaptchaAI API in minutes.

Solve your first captcha with the NoCaptchaAI API in three short steps: create a task, poll for the result, and use the returned token.

Base URL: https://api.nocaptchaai.com — Grab your free API key from the NoCaptchaAI dashboard.

Solve a captcha with the API

The API is asynchronous: you submit a task, then poll for its result. The example below solves a Cloudflare Turnstile challenge, but the same flow works for every supported captcha type.

Get your API key

Sign in to the NoCaptchaAI dashboard and copy your clientKey from the API section. Keep it secret — treat it like a password.

Export it so the snippets below can pick it up:

export NOCAPTCHAAI_KEY="YOUR_API_KEY"

Create a task

Send a POST request to /createTask describing the challenge you want solved.

curl -s -X POST https://api.nocaptchaai.com/createTask \
  -H "Content-Type: application/json" \
  -d '{
    "clientKey": "'"$NOCAPTCHAAI_KEY"'",
    "task": {
      "type": "AntiTurnstileTask",
      "websiteURL": "https://example.com",
      "websiteKey": "0x4AAAAAAA..."
    }
  }'
import os
import requests

API_KEY = os.environ["NOCAPTCHAAI_KEY"]
BASE_URL = "https://api.nocaptchaai.com"

resp = requests.post(
    f"{BASE_URL}/createTask",
    json={
        "clientKey": API_KEY,
        "task": {
            "type": "AntiTurnstileTask",
            "websiteURL": "https://example.com",
            "websiteKey": "0x4AAAAAAA...",
        },
    },
)
resp.raise_for_status()
task_id = resp.json()["taskId"]
print("taskId:", task_id)
const API_KEY = process.env.NOCAPTCHAAI_KEY;
const BASE_URL = "https://api.nocaptchaai.com";

const res = await fetch(`${BASE_URL}/createTask`, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    clientKey: API_KEY,
    task: {
      type: "AntiTurnstileTask",
      websiteURL: "https://example.com",
      websiteKey: "0x4AAAAAAA...",
    },
  }),
});

const { taskId } = await res.json();
console.log("taskId:", taskId);

A successful response returns a taskId you'll use to fetch the result:

{
  "errorId": 0,
  "status": "idle",
  "taskId": "8f0e5b2a-1c3d-4e6f-9a0b-1c2d3e4f5a6b"
}

Poll for the result

Send the taskId to /getTaskResult until status is "ready". While the task is still being solved you'll get status: "processing" — wait a couple of seconds and try again.

curl -s -X POST https://api.nocaptchaai.com/getTaskResult \
  -H "Content-Type: application/json" \
  -d '{
    "clientKey": "'"$NOCAPTCHAAI_KEY"'",
    "taskId": "8f0e5b2a-1c3d-4e6f-9a0b-1c2d3e4f5a6b"
  }'
import time

while True:
    resp = requests.post(
        f"{BASE_URL}/getTaskResult",
        json={"clientKey": API_KEY, "taskId": task_id},
    )
    resp.raise_for_status()
    result = resp.json()

    if result["status"] == "ready":
        break
    time.sleep(2)

token = result["solution"]["token"]
print("token:", token)
let result;
while (true) {
  const res = await fetch(`${BASE_URL}/getTaskResult`, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ clientKey: API_KEY, taskId }),
  });

  result = await res.json();
  if (result.status === "ready") break;
  await new Promise((r) => setTimeout(r, 2000));
}

const token = result.solution.token;
console.log("token:", token);

When the task is solved, the response includes the token under solution.token:

{
  "errorId": 0,
  "status": "ready",
  "solution": {
    "token": "0.aBcDeFgH...turnstile-response-token"
  }
}

Use the solution

The returned solution.token is the captcha response you submit to the target site — exactly as a real browser would. For Turnstile and reCAPTCHA, place it in the form field the site expects (for example cf-turnstile-response or g-recaptcha-response) and send your request as usual.

Tokens are single-use and short-lived. Submit each token immediately and request a fresh task for every new attempt.

No-code option

Prefer not to write code? Install the browser extension and let NoCaptchaAI solve captchas automatically as you browse — just sign in with the same API key.

Next steps

On this page

Content-Length: 0