Tencent & Chinese Captcha Solver API NEW

Ultra-fast, AI-driven solver for Tencent Captcha (腾讯验证码) & Chinese Character Captchas with 97% overall accuracy and < 200ms latency.

⚡ High-Speed Multi-Task AI Pipeline: Powered by YOLOv8 Object Detection & Siamese Deep Metric Networks trained on 500+ Verified Golden Samples. Solves Slider, Sequence Order Click, and Spatial Category Click challenges in a single API call.

Supported Captcha Types (3-in-1 Solver)

1. Slider Puzzle (V1 & V2)

Identifies puzzle piece target horizontal offset (center_x) with millimeter precision.

type: "slider"

2. Sequence Order Click

Matches 3 target icons from instruction strip to exact background coordinates in ordered sequence.

type: "sequence"

3. Spatial / Category Click

Detects and clicks specific target object categories across 6-grid or free-form background images.

type: "click"

Endpoint Information

POST https://captchakings.com/api/tencent.php
💰 Pricing: $0.001 per solve ($1.00 / 1000 solves) — Over 50% cheaper than 2Captcha and CapSolver!
🔑 Authentication: Pass your CaptchaKings API key via Authorization: Bearer ck_..., X-API-Key, or JSON field api_key.

Request Parameters

Parameter Type Required Description
type string No Captcha subtype: "slider", "sequence", or "click" (Auto-detected if omitted).
image_base64 string / file Conditional Main background image (Base64 string or multipart file upload).
slice_image_base64 string / file Optional Cropped puzzle piece for slider V2 (optional, enhances precision).
target_image_base64 string / file Conditional Instruction target strip image for sequence order click captcha.
bg_image_base64 string / file Conditional Background canvas image for sequence order click captcha.
category string Conditional Target text category for click spatial captcha (e.g. "clock", "umbrella").
api_key string Yes* Your CaptchaKings API key (optional if Authorization: Bearer header is sent).

Example Responses

1. Sequence Order Click Response (Type: "sequence")

{
  "success": true,
  "type": "sequence",
  "click_coordinates": [
    [439, 357],
    [600, 437],
    [360, 117]
  ],
  "scores": [0.9969, 0.9888, 0.8823],
  "confidence": 0.97,
  "processing_time": "0.17s",
  "billing": {
    "amount_charged": "0.001000",
    "balance_remaining": "19.999000",
    "plan": "pay_as_you_go"
  },
  "message": "Sequence order matching predicted successfully"
}

2. Slider Puzzle Response (Type: "slider")

{
  "success": true,
  "type": "slider",
  "slider_position": {
    "center_x": 348,
    "center_y": 182,
    "x1": 318,
    "y1": 152,
    "x2": 378,
    "y2": 212
  },
  "confidence": 0.98,
  "processing_time": "0.12s",
  "billing": {
    "amount_charged": "0.001000",
    "balance_remaining": "19.998000",
    "plan": "pay_as_you_go"
  },
  "message": "Slider target detected successfully"
}

Integration Code Examples

Python (Sequence Click & Slider)

import requests
import base64

API_KEY = "ck_your_api_key_here"

# 1. Solve Sequence Order Click (Strip + BG)
with open("target_strip.png", "rb") as f_target, open("background.png", "rb") as f_bg:
    target_b64 = base64.b64encode(f_target.read()).decode("utf-8")
    bg_b64 = base64.b64encode(f_bg.read()).decode("utf-8")

response = requests.post(
    "https://captchakings.com/api/tencent.php",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={
        "type": "sequence",
        "target_image_base64": target_b64,
        "bg_image_base64": bg_b64
    },
    timeout=30
)

data = response.json()
if data["success"]:
    print("Click coordinates in order:", data["click_coordinates"])
    # Output: [[439, 357], [600, 437], [360, 117]]
    for i, (x, y) in enumerate(data["click_coordinates"]):
        print(f"Step {i+1}: Click at ({x}, {y})")
else:
    print("Solve failed:", data.get("error"))

Node.js / JavaScript

const fs = require('fs');

async function solveTencentSequence() {
    const targetB64 = fs.readFileSync('target_strip.png').toString('base64');
    const bgB64 = fs.readFileSync('background.png').toString('base64');

    const res = await fetch('https://captchakings.com/api/tencent.php', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'Authorization': 'Bearer ck_your_api_key_here'
        },
        body: JSON.stringify({
            type: 'sequence',
            target_image_base64: targetB64,
            bg_image_base64: bgB64
        })
    });

    const result = await res.json();
    if (result.success) {
        console.log('Solve coordinates:', result.click_coordinates);
    }
}

solveTencentSequence();

cURL Example

curl -X POST https://captchakings.com/api/tencent.php \
  -H "Authorization: Bearer ck_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "sequence",
    "target_image_base64": "iVBORw0KGgoAAAANSUhEUgAA...",
    "bg_image_base64": "iVBORw0KGgoAAAANSUhEUgAA..."
  }'

Automated Browser Injected Solver (DOM / Webview / Puppeteer)

Below is the complete client solver function to inject into Tencent Captcha iframes via Puppeteer, Playwright, Selenium, or Electron Webview:

// Injected Client Script (Dispatches natural clicks directly inside iframe)
async function solveTencentIframe(iframeElement, apiKey) {
    const iframeDoc = iframeElement.contentDocument || iframeElement.contentWindow.document;
    const bgEl = iframeDoc.querySelector('#slideBg, .tc-bg-img');
    const targetEl = iframeDoc.querySelector('.tc-instruction-icon img, #instructionIcon img, .tc-desc-img img');

    if (!bgEl || !targetEl) return false;

    // Convert DOM images to Base64
    const getBase64 = (img) => {
        const c = document.createElement('canvas');
        c.width = img.naturalWidth || img.width;
        c.height = img.naturalHeight || img.height;
        c.getContext('2d').drawImage(img, 0, 0);
        return c.toDataURL('image/png').split(',')[1];
    };

    const targetB64 = getBase64(targetEl);
    const bgB64 = getBase64(bgEl);

    // Call CaptchaKings API
    const response = await fetch('https://captchakings.com/api/tencent.php', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'Authorization': 'Bearer ' + apiKey
        },
        body: JSON.stringify({
            type: 'sequence',
            target_image_base64: targetB64,
            bg_image_base64: bgB64
        })
    });

    const data = await response.json();
    if (!data.success) throw new Error(data.error);

    // Dispatch Ordered Clicks with Scaling
    const bgRect = bgEl.getBoundingClientRect();
    const scaleX = bgRect.width / (bgEl.naturalWidth || 680);
    const scaleY = bgRect.height / (bgEl.naturalHeight || 480);

    for (const [origX, origY] of data.click_coordinates) {
        const clickX = bgRect.left + (origX * scaleX);
        const clickY = bgRect.top + (origY * scaleY);
        
        bgEl.dispatchEvent(new MouseEvent('mousedown', { bubbles: true, clientX: clickX, clientY: clickY, button: 0, buttons: 1 }));
        await new Promise(r => setTimeout(r, 50));
        bgEl.dispatchEvent(new MouseEvent('mouseup', { bubbles: true, clientX: clickX, clientY: clickY, button: 0, buttons: 0 }));
        bgEl.dispatchEvent(new MouseEvent('click', { bubbles: true, clientX: clickX, clientY: clickY, button: 0 }));
        await new Promise(r => setTimeout(r, 300));
    }

    // Submit Verify
    const verifyBtn = iframeDoc.querySelector('#verifyBtn, .tc-verify-button, .tc-verify-button-wrap button');
    if (verifyBtn) {
        verifyBtn.click();
    }
    return true;
}