🤖 TikTok Captcha API

Hướng dẫn sử dụng API giải captcha TikTok (2 đối tượng)

📋 Thông tin API

🔗 Lấy Host URL

URL host được lấy từ: https://raw.githubusercontent.com/dacohacotool/host_kk/refs/heads/main/url_serverkey.txt

POST {urlhost}/tiktok/twoobject

📤 Request Data

{ "base64_image": "iVBORw0KGgoAAAANSUhEUgAA..." }

base64_image: Chuỗi base64 thuần túy của ảnh captcha cần giải (KHÔNG bao gồm header data:image/...)

📷 Ví dụ ảnh captcha cần tải lên:

Ảnh captcha TikTok dạng "Chọn 2 đối tượng giống nhau" như hình dưới:

Ví dụ captcha TikTok

📥 Response Data

{ "success": true, "result": { "diem1": [5, 7], "diem2": [122, 5] }, "base64ResultImage": "iVBORw0KGgoAAAANSUhEUgAA..." }

🔍 Giải thích Response:

  • success: Trạng thái xử lý (true/false)
  • result.diem1: Tọa độ (x, y) của đối tượng thứ 1
  • result.diem2: Tọa độ (x, y) của đối tượng thứ 2
  • base64ResultImage: Ảnh kết quả đã được đánh dấu (base64 thuần túy, không có header)

🐍 Code Python mẫu

import requests import base64 # Lấy URL host def get_host_url(): try: response = requests.get('https://raw.githubusercontent.com/dacohacotool/host_kk/refs/heads/main/url_serverkey.txt') return response.text.strip() except Exception as e: print(f"Lỗi lấy host URL: {e}") return None # Chuyển ảnh thành base64 def image_to_base64(image_path): try: with open(image_path, "rb") as image_file: encoded_string = base64.b64encode(image_file.read()).decode('utf-8') return encoded_string # Trả về base64 thuần túy except Exception as e: print(f"Lỗi đọc ảnh: {e}") return None # Gọi API giải captcha def solve_tiktok_captcha(image_path): # Lấy host URL host_url = get_host_url() if not host_url: return None # Chuyển ảnh thành base64 base64_image = image_to_base64(image_path) if not base64_image: return None # Chuẩn bị data data = { "base64_image": base64_image } try: # Gửi request response = requests.post(f"{host_url}/tiktok/twoobject", json=data) result = response.json() if result.get('success'): print("✅ Giải captcha thành công!") print(f"🎯 Điểm 1: {result['result']['diem1']}") print(f"🎯 Điểm 2: {result['result']['diem2']}") return result else: print("❌ Giải captcha thất bại!") return None except Exception as e: print(f"Lỗi API: {e}") return None # Sử dụng if __name__ == "__main__": image_path = "captcha.png" result = solve_tiktok_captcha(image_path) if result: print("Kết quả:", result)

🧪 Test API

📸

Tải lên ảnh captcha

Kéo thả ảnh vào đây hoặc click để chọn file

Hỗ trợ: JPG, PNG, GIF

Preview

📊 Kết quả