Advanced API for automated CAPTCHA solving. Enterprise-grade reliability with 99.9% uptime guarantee.
Sign up for a free account and get your API key from the dashboard. New users receive $15 in free credits.
Create AccountSubmit CAPTCHAs for solving using our advanced API.
POST /createTask
Poll for task results and integrate solutions into your workflow.
POST /getTaskResult
Method | Endpoint | Description | Authentication |
---|---|---|---|
POST | /createTask | Create a new CAPTCHA solving task | clientKey in body |
POST | /getTaskResult | Get the result of a CAPTCHA solving task | clientKey in body |
POST | /captcha/solve | Legacy endpoint - Submit and solve CAPTCHA synchronously | API Key header |
GET | /captcha/types | Get supported CAPTCHA types and pricing | None |
GET | /captcha/analytics | Get usage analytics | JWT Token |
Task Type | Description |
---|---|
ReCaptchaV2TaskProxyless | Google ReCaptcha V2 without proxy |
ReCaptchaV2Task | Google ReCaptcha V2 with proxy |
ReCaptchaV2EnterpriseTask | Google ReCaptcha V2 Enterprise with proxy |
ReCaptchaV2EnterpriseTaskProxyless | Google ReCaptcha V2 Enterprise without proxy |
ReCaptchaV3TaskProxyless | Google ReCaptcha V3 without proxy |
ReCaptchaV3Task | Google ReCaptcha V3 with proxy |
ReCaptchaV3Enterprise | Google ReCaptcha V3 Enterprise |
ReCaptchaV3EnterpriseTaskProxyless | Google ReCaptcha V3 Enterprise without proxy |
ReCaptchaMobileProxyless | Mobile ReCaptcha without proxy |
ReCaptchaMobile | Mobile ReCaptcha with proxy |
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "ReCaptchaV2TaskProxyless",
"websiteURL": "https://example.com",
"websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-"
},
"callbackUrl": "https://your-server.com/callback" // optional
}
{
"clientKey": "YOUR_API_KEY",
"taskId": "a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6"
}
import requests
import time
import json
CLIENT_KEY = "your_api_key_here"
BASE_URL = "https://api.ai4cap.com"
# Create a CAPTCHA solving task
def create_task(website_url, website_key, task_type="ReCaptchaV2TaskProxyless"):
response = requests.post(
f"{BASE_URL}/createTask",
headers={"Content-Type": "application/json"},
json={
"clientKey": CLIENT_KEY,
"task": {
"type": task_type,
"websiteURL": website_url,
"websiteKey": website_key
}
}
)
result = response.json()
if result["errorId"] == 0:
return result["taskId"]
else:
raise Exception(f"Error: {result.get('errorDescription', 'Unknown error')}")
# Get task result
def get_task_result(task_id):
while True:
response = requests.post(
f"{BASE_URL}/getTaskResult",
headers={"Content-Type": "application/json"},
json={
"clientKey": CLIENT_KEY,
"taskId": task_id
}
)
result = response.json()
if result["errorId"] != 0:
raise Exception(f"Error: {result.get('errorDescription', 'Unknown error')}")
if result["status"] == "ready":
return result["solution"]["gRecaptchaResponse"]
elif result["status"] == "processing":
time.sleep(2) # Wait before retry
else:
raise Exception("Unknown status")
# Example usage
task_id = create_task("https://example.com", "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-")
solution = get_task_result(task_id)
print(f"CAPTCHA solved: {solution}")
const CLIENT_KEY = 'your_api_key_here';
const BASE_URL = 'https://api.ai4cap.com';
// Create a CAPTCHA solving task
async function createTask(websiteURL, websiteKey, taskType = 'ReCaptchaV2TaskProxyless') {
const response = await fetch(`${BASE_URL}/createTask`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
clientKey: CLIENT_KEY,
task: {
type: taskType,
websiteURL: websiteURL,
websiteKey: websiteKey
}
})
});
const result = await response.json();
if (result.errorId === 0) {
return result.taskId;
} else {
throw new Error(result.errorDescription || 'Unknown error');
}
}
// Get task result with polling
async function getTaskResult(taskId) {
while (true) {
const response = await fetch(`${BASE_URL}/getTaskResult`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
clientKey: CLIENT_KEY,
taskId: taskId
})
});
const result = await response.json();
if (result.errorId !== 0) {
throw new Error(result.errorDescription || 'Unknown error');
}
if (result.status === 'ready') {
return result.solution.gRecaptchaResponse;
} else if (result.status === 'processing') {
// Wait 2 seconds before retry
await new Promise(resolve => setTimeout(resolve, 2000));
}
}
}
// Example usage
(async () => {
try {
const taskId = await createTask('https://example.com', '6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-');
const solution = await getTaskResult(taskId);
console.log('CAPTCHA solved:', solution);
} catch (error) {
console.error('Error:', error);
}
})();
<?php
$CLIENT_KEY = 'your_api_key_here';
$BASE_URL = 'https://api.ai4cap.com';
// Create a CAPTCHA solving task
function createTask($websiteURL, $websiteKey, $taskType = 'ReCaptchaV2TaskProxyless') {
global $CLIENT_KEY, $BASE_URL;
$ch = curl_init("$BASE_URL/createTask");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'clientKey' => $CLIENT_KEY,
'task' => [
'type' => $taskType,
'websiteURL' => $websiteURL,
'websiteKey' => $websiteKey
]
]));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
if ($result['errorId'] == 0) {
return $result['taskId'];
} else {
throw new Exception($result['errorDescription'] ?? 'Unknown error');
}
}
// Get task result with polling
function getTaskResult($taskId) {
global $CLIENT_KEY, $BASE_URL;
while (true) {
$ch = curl_init("$BASE_URL/getTaskResult");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'clientKey' => $CLIENT_KEY,
'taskId' => $taskId
]));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
if ($result['errorId'] != 0) {
throw new Exception($result['errorDescription'] ?? 'Unknown error');
}
if ($result['status'] == 'ready') {
return $result['solution']['gRecaptchaResponse'];
} elseif ($result['status'] == 'processing') {
sleep(2); // Wait before retry
}
}
}
// Example usage
try {
$taskId = createTask('https://example.com', '6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-');
$solution = getTaskResult($taskId);
echo "CAPTCHA solved: $solution\n";
} catch (Exception $e) {
echo "Error: " . $e->getMessage() . "\n";
}
?>
require 'net/http'
require 'json'
require 'uri'
CLIENT_KEY = 'your_api_key_here'
BASE_URL = 'https://api.ai4cap.com'
# Create a CAPTCHA solving task
def create_task(website_url, website_key, task_type = 'ReCaptchaV2TaskProxyless')
uri = URI("#{BASE_URL}/createTask")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = {
clientKey: CLIENT_KEY,
task: {
type: task_type,
websiteURL: website_url,
websiteKey: website_key
}
}.to_json
response = http.request(request)
result = JSON.parse(response.body)
if result['errorId'] == 0
result['taskId']
else
raise result['errorDescription'] || 'Unknown error'
end
end
# Get task result with polling
def get_task_result(task_id)
uri = URI("#{BASE_URL}/getTaskResult")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
loop do
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = {
clientKey: CLIENT_KEY,
taskId: task_id
}.to_json
response = http.request(request)
result = JSON.parse(response.body)
raise result['errorDescription'] || 'Unknown error' if result['errorId'] != 0
case result['status']
when 'ready'
return result['solution']['gRecaptchaResponse']
when 'processing'
sleep 2 # Wait before retry
else
raise 'Unknown status'
end
end
end
# Example usage
begin
task_id = create_task('https://example.com', '6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-')
solution = get_task_result(task_id)
puts "CAPTCHA solved: #{solution}"
rescue => e
puts "Error: #{e.message}"
end
{
"errorId": 0,
"taskId": "a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6"
}
{
"errorId": 0,
"status": "ready",
"solution": {
"gRecaptchaResponse": "03AGdBq25SxXT-pf...",
"token": "03AGdBq25SxXT-pf..."
},
"cost": "0.002000",
"ip": "1.2.3.4",
"createTime": 1679004358,
"endTime": 1679004368,
"solveCount": 1
}
{
"errorId": 0,
"status": "processing"
}
{
"errorId": 1,
"errorCode": "ERROR_CAPTCHA_UNSOLVABLE",
"errorDescription": "This type of captcha is not supported"
}
Error Code | Description | Solution |
---|---|---|
ERROR_TASK_NOT_SUPPORTED | The requested task type is not supported | Check supported task types above |
ERROR_INSUFFICIENT_BALANCE | Account balance is too low | Top up your account balance |
ERROR_TASK_NOT_FOUND | Task ID not found | Verify the task ID is correct |
ERROR_CAPTCHA_UNSOLVABLE | CAPTCHA could not be solved | Try again or check CAPTCHA parameters |
ERROR_INTERNAL | Internal server error | Try again later or contact support |
Get your API key and start solving CAPTCHAs in minutes