SELLVIA24H.SITE SELLVIA24H.SITE
Kênh Mạng Xã Hội 24/7
Group Zalo Zalo CSKH
Đăng Nhập Đăng Ký

Tạo Ảnh Mặt Người AI Ngẫu Nhiên (Random Face)

Công cụ sinh ảnh đại diện khuôn mặt người thật 100% bằng trí tuệ nhân tạo (AI), không trùng lặp, dùng để tạo và nuôi nick VIA Facebook, Instagram, TikTok, Telegram, Zalo & tích hợp vào Tool Reg tự động.

Giới tính:
Chế độ xem:
AI Face

Mã Nguồn Python Tích Hợp Vào Tool (Automation Code)

Dùng trực tiếp cho Tool Reg IG, Facebook, TikTok, Zalo, GPM-App, Selenium
import requests
import random
import os

def get_random_avatar(gender="all", save_path="avatar.jpg"):
    """
    Tải ảnh khuôn mặt AI ngẫu nhiên dùng để reg clone/via Facebook, Instagram, TikTok.
    :param gender: 'men' (Nam), 'women' (Nữ), hoặc 'all' (Ngẫu nhiên cả 2)
    :param save_path: Đường dẫn file ảnh muốn lưu
    :return: Đường dẫn tuyệt đối đến file ảnh đã tải
    """
    if gender == "all":
        gender = random.choice(["men", "women"])
    
    photo_id = random.randint(1, 95)
    url = f"https://randomuser.me/api/portraits/{gender}/{photo_id}.jpg"
    
    try:
        res = requests.get(url, timeout=10)
        if res.status_code == 200:
            with open(save_path, "wb") as f:
                f.write(res.content)
            print(f"[+] Đã tải ảnh avatar {gender} thành công: {save_path}")
            return os.path.abspath(save_path)
    except Exception as e:
        # Fallback tự động sang server dự phòng Pravatar
        fallback_url = f"https://i.pravatar.cc/400?img={photo_id}"
        res = requests.get(fallback_url, timeout=10)
        with open(save_path, "wb") as f:
            f.write(res.content)
        return os.path.abspath(save_path)

# ==========================================
# VÍ DỤ SỬ DỤNG TRONG TOOL REG TÀI KHOẢN:
# ==========================================
if __name__ == "__main__":
    # Tải 1 ảnh nữ làm avatar cho tool reg Instagram / Facebook:
    avatar_file = get_random_avatar(gender="women", save_path="avatar_ig.jpg")
    print(f"File avatar sẵn sàng upload: {avatar_file}")
import requests
import random
import os
from concurrent.futures import ThreadPoolExecutor

def download_single_face(index, gender="women", output_dir="avatars"):
    """Hàm tải 1 ảnh chạy trong từng luồng (Thread)"""
    os.makedirs(output_dir, exist_ok=True)
    photo_id = random.randint(1, 95)
    g = gender if gender in ["men", "women"] else random.choice(["men", "women"])
    url = f"https://randomuser.me/api/portraits/{g}/{photo_id}.jpg"
    file_path = os.path.join(output_dir, f"face_{index+1}_{g}_{photo_id}.jpg")
    
    try:
        res = requests.get(url, timeout=10)
        if res.status_code == 200:
            with open(file_path, "wb") as f:
                f.write(res.content)
            print(f"[{index+1}] Đã tải: {file_path}")
            return file_path
    except Exception as e:
        print(f"[{index+1}] Lỗi tải ảnh: {e}")
    return None

def download_batch_faces(total=20, gender="women", max_workers=5, output_dir="avatars"):
    """
    Tải hàng loạt ảnh khuôn mặt AI đa luồng tốc độ cao.
    :param total: Tổng số ảnh cần tải về
    :param gender: 'men' / 'women' / 'all'
    :param max_workers: Số luồng tải đồng thời
    """
    print(f"[*] Bắt đầu tải {total} ảnh khuôn mặt AI (Giới tính: {gender})...")
    with ThreadPoolExecutor(max_workers=max_workers) as executor:
        results = list(executor.map(lambda i: download_single_face(i, gender, output_dir), range(total)))
    
    success_count = len([r for r in results if r])
    print(f"[✓] Hoàn tất! Đã tải thành công {success_count}/{total} ảnh vào thư mục '{output_dir}/'")

if __name__ == "__main__":
    # Tải sẵn 30 ảnh nữ vào thư mục 'avatars' để nuôi nick:
    download_batch_faces(total=30, gender="women", max_workers=8, output_dir="avatars")
import requests

# URL API của hệ thống
API_URL = "https://sellvia24h.site/api/random-face.php"

def get_faces_from_api(gender="women", amount=5):
    """
    Lấy danh sách link ảnh mặt người AI từ API máy chủ
    """
    params = {
        "gender": gender,  # 'men', 'women', 'all'
        "amount": amount   # Số lượng (1 - 50)
    }
    
    try:
        response = requests.get(API_URL, params=params, timeout=10)
        data = response.json()
        
        if data.get("status") == "success":
            print(f"[+] Lấy thành công {len(data['data'])} ảnh từ API:")
            for item in data["data"]:
                print(f" - [{item['gender']}] {item['image_url']}")
            return data["data"]
    except Exception as e:
        print(f"[-] Lỗi gọi API: {e}")
    return []

if __name__ == "__main__":
    get_faces_from_api(gender="women", amount=5)
# 1. Gọi API lấy JSON danh sách 10 ảnh nữ:
curl -X GET "https://sellvia24h.site/api/random-face.php?gender=women&amount=10"

# 2. Gọi API lấy 1 ảnh chuyển hướng trực tiếp (Dùng cho thẻ <img> hoặc request raw):
curl -L -X GET "https://sellvia24h.site/api/random-face.php?gender=women&type=redirect" --output avatar.jpg

# 3. Lấy ảnh nam ngẫu nhiên:
curl -X GET "https://sellvia24h.site/api/random-face.php?gender=men&amount=1"
Zalo 24/7
Tối