Skip to content

How to send a picture for recognition.

List of supported tasks:

Solve Media, Facebook, Yandex, Steam, VKontakte, BotDetect, Google, HotMail, Avito and more than 100,000 other types.

How to choose the right neural network for your type of captcha:

logo
Choose a neural network that is perfect for your type of captcha on the page https://cap.guru/en/my/settings /
The changes will take effect within 5 minutes.

Method OLD is the most versatile method, suitable for any type of captcha, the percentage of recognition is lower than that of special ones.
General v1 is a general captcha recognition method, with more accurate recognition of some subspecies.
individual_v1 - Similar to the previous method, but more accurate to numeric captchas.
General Cyrillic is a general method for Cyrillic captchas.

Request example

http://api2.cap.guru/in.php

ParameterTypeRequiredDescription
keyStringYes[The key can be viewed here](https://cap.guru /)
methodStringYespost — indicates that you are sending an image using multipart-thomas
base64 — indicates that you are sending an image in base64 format
fileFileYes*Image file.
* - required if you send the image as a file (method=post)
bodyStringYes*Image encoded in Base64 format,
* - required if you send the image to Base64 (method=base64)
jsonNumber
By default: 0
No0 - The server will send a response in plain text
1 - The server will send a response in JSON format
vernetNumberNo2 - General v1
6 - General v2
22 - Arithmetic
12 - Rambler
18 - General Yandex
20 - Yandex, 6 ch.
16 - VKontakte
14 - SolveMedia
13 -Gibdd
9 - Ok.ru
17 - World of Tanks
5 - Microsoft Hotmail

Example: vernet=5
Request/response example

Request example

text
POST  http://api2.cap.guru/in.php
Host: api2.cap.guru
Content-Type: application/json
json
{
  "key": "YOUR_API_KEY",
  "method": "base64",
  "body": "R0lGODlheAAoAAAAACwAAAAAeAAoAIcAAAAAADMAAGYAAJkAAMwAAP8AKwAAKzMAK2YAK5kAK8wAK/8AVQAAVTMAVWYAVZkAVcwAVf8AgAAAgDMAgGYAgJkAgMwAgP8AqgAAqjMAqmYAqpkAqswAqv8A1QAA1TMA1WYA1ZkA1cwA1f8A/wAA/zMA/2YA/5kA/8wA//8zAAAzADMzAGYzAJkzAMwzAP8zKwAzKzMzK2YzK5kzK8wzK/8zVQAzVTMzVWYzVZkzVcwzVf8zgAAzgDMzgGYzgJkzgMwzgP8zqgAzqjMz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Bt4H1urpsXEnRX7N9zZhhQCG760dNXTku3WJyz0r9TlFyp73nf+Vftr6ZeoEuZuP+Hvg033etUOliaYl8IXc5e42aMCogRU3xFAaeaXBdZNFjwGgmXH1WEYYTl0tthBhYBG2nnZocVZQcwNhxtpykw20VFLCwWeTAaX1phCFXoUFAIBioCHGJB6ulyFNyl20n2RgcScQd8PFB11N9tV0oXwI8aUZWWipSNFvyiR42j7Q5LaUhOghRCFBHoaV2mk5MnmUhF/dN1NcUO132n0CbVlQgsCl1RZqLpKpEZyvGYVTgqm9NyRwRX2IY0If7oOZSIHSSRCLpy1WqGNZDpRfVOS5F51BboY0qZimYbZSeBseWNChTA55EIci1eWkhpa2qFBzNtJTtCqbhpL5G60ZJVjpDWQSU5qdtg1KpU3kPRoippHGxFFzaE2USaUYKhuSh65ulKy0HFX1JbbcSgRtt+CGK+645JZr7rnopqvuuuy26+678MYrb0AAOw==",
  "json": 1
}

After sending the task to us, you should receive in response 'OK|65787087' or {"status":1,"request":"65787087"} if the request is successful. Please read [the full list of possible errors] (/en/api/code_error) in case you did not receive the task number.

Response example

json
{
 "status":1,
 "request":"65787087"
}

Getting a response

http://api2.cap.guru/res.php

ParameterTypeRequiredDescription
keyStringYesThe key can be viewed here
actionStringYesget — get response
idNumberYesID of captcha returned by in.php.
jsonNumber
By default: 0
No0 — the server will return a response in plain text
1 — the server will return a response in JSON format
Request/response example

Request example

text
POST  http://api2.cap.guru/res.php 
Host: api2.cap.guru
Content-Type: application/json
json
{
  "key": "YOUR_API_KEY",
  "action": "get",
  "id": "XXXXXXXXXXXXXXXXXX", // for example 65787087
  "json": 1
}

After sending the task to us, you should receive in response 'OK|W68HP' or {"status":1,"request":"W68HP"} if the request is successful. Please read [the full list of possible errors] (/en/api/code_error) in case you have not received a response.

Sample response

json
{
 "status":1,
 "request":"W68HP"
}

Recognition via the browser.

You can check the operation of the service and support for your type of captcha at: http://imacros2.cap.guru/

To do this, you need to specify the API key from your personal account and select the saved captcha image.

Examples

py
import requests
from io import BytesIO
import base64
import time

key = '17a1f02f43bfb8025f4ef3a56fc425cf'
url = 'https://test.cap.guru/web/_images/ex.png'
response = requests.get(url)

ee = base64.b64encode((response.content))

payload = {'key': key, 'method': 'base64', 'body': ee}
r = requests.post("http://api.cap.guru/in.php", data=payload)

time.sleep(10)

rt = r.text.split('|')
url = 'http://api.cap.guru/res.php?key='+key+'&id='+rt[1]
print(url);
response = requests.get(url)

print(response.content)
php
<?php 

 

$file = base64_encode(file_get_contents("http://test.cap.guru/web/_images/aws/99737344449386000000.png"));

$json = [];
$json['key'] = "17a1f02f43bfb8025f4ef3a56fc425cf";
$json['method'] = "base64";
$json['click'] = "oth";
$json['textinstructions'] = "Amazon,Place a dot at the end of the car's path";
$json['body'] = $file;


$postdata = http_build_query($json);

$opts = array('http' =>
    array(
        'method'  => 'POST',
        'header'  => 'Content-Type: application/x-www-form-urlencoded',
        'content' => $postdata
    )
);

$context  = stream_context_create($opts);

$result = file_get_contents('http://api.cap.guru/in.php', false, $context);

sleep(5);

//echo $server_output;
echo file_get_contents("http://api.cap.guru/res.php?key=17a1f02f43bfb8025f4ef3a56fc425cf&action=get&id=".explode("|", $result)[1]);

?>
js

var request = require('request');

var img =  getBinanceBase64();

var YOUR_API_KEY = "17a1f02f43bfb8025f4ef3a56fc425cf";

(async() => {
	var waw =  await k(img);
	console.log(waw);
})();

function delay(time) {
	return new Promise(function(resolve) {
		setTimeout(resolve, time)
	});
}
async function k(img) {

	return new Promise(async function(resolve2) {
		let buffurl1 = img
		var myJSONObject = {
			"key": YOUR_API_KEY,
			"method": "base64",
			"body": buffurl1,
			
		};
		request({
			url: "http://api.cap.guru/in.php",
			method: "POST",
			json: true,
			body: myJSONObject
		}, async function(error, response, body) {
			console.log(body);
			id = body.split("|")[1]
			let res = await delay(5000).then(async() => {
				let res2 = await get_result_request(id);
				console.log(res2);
				dd = res2.split("|")[1]
				resolve2(dd )
			});
		});
	});

	function get_result_request(id) {
		return new Promise(async resolve => {
			return await request.get('http://api.cap.guru/res.php?key=' + YOUR_API_KEY + '&id=' + id + '&action=get', async function(error2, response2, body2) {
				resolve(body2);
			})
		});
	}
}



function getBinanceBase64(){
	return "data:image/gif;base64,R0lGODlheAAoAAAAACwAAAAAeAAoAIcAAAAAADMAAGYAAJkAAMwAAP8AKwAAKzMAK2YAK5kAK8wAK/8AVQAAVTMAVWYAVZkAVcwAVf8AgAAAgDMAgGYAgJkAgMwAgP8AqgAAqjMAqmYAqpkAqswAqv8A1QAA1TMA1WYA1ZkA1cwA1f8A/wAA/zMA/2YA/5kA/8wA//8zAAAzADMzAGYzAJkzAMwzAP8zKwAzKzMzK2YzK5kzK8wzK/8zVQAzVTMzVWYzVZkzVcwzVf8zgAAzgDMzgGYzgJkzgMwzgP8zqgAzqjMzqmYzqpkzqswzqv8z1QAz1TMz1WYz1Zkz1cwz1f8z/wAz/zMz/2Yz/5kz/8wz//9mAABmADNmAGZmAJlmAMxmAP9mKwBmKzNmK2ZmK5lmK8xmK/9mVQBmVTNmVWZmVZlmVcxmVf9mgABmgDNmgGZmgJlmgMxmgP9mqgBmqjNmqmZmqplmqsxmqv9m1QBm1TNm1WZm1Zlm1cxm1f9m/wBm/zNm/2Zm/5lm/8xm//+ZAACZADOZAGaZAJmZAMyZAP+ZKwCZKzOZK2aZK5mZK8yZK/+ZVQCZVTOZVWaZVZmZVcyZVf+ZgACZgDOZgGaZgJmZgMyZgP+ZqgCZqjOZqmaZqpmZqsyZqv+Z1QCZ1TOZ1WaZ1ZmZ1cyZ1f+Z/wCZ/zOZ/2aZ/5mZ/8yZ///MAADMADPMAGbMAJnMAMzMAP/MKwDMKzPMK2bMK5nMK8zMK//MVQDMVTPMVWbMVZnMVczMVf/MgADMgDPMgGbMgJnMgMzMgP/MqgDMqjPMqmbMqpnMqszMqv/M1QDM1TPM1WbM1ZnM1czM1f/M/wDM/zPM/2bM/5nM/8zM////AAD/ADP/AGb/AJn/AMz/AP//KwD/KzP/K2b/K5n/K8z/K///VQD/VTP/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