Skip to content

faceseek-online/face-search-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

👁️ FaceSeek Face Search API


🧠 Overview

FaceSeek provides an AI-powered Face Search API that enables you to find matching faces from large datasets or the web using a single photo.
Integrate our facial recognition system into your apps, sites, or backend services easily.


🚀 Quick Start

1️⃣ Set Up Your API Credentials

Create a .env file in your project root with your API credentials:

API_HOST=https://faceseek.online
API_KEY=your_api_key_here

2️⃣ Install Dependencies

  • For Python:
pip install gradio_client
  • For JavaScript:
npm i -D @gradio/client

🔐 Authentication

You’ll receive your credentials from the FaceSeek team:

Variable Description
API_HOST Base endpoint for your API instance
API_KEY Your authentication key for API requests

All endpoints require a valid API_KEY. Pass it in your request payload under the api_token or token field.


⚙️ Endpoints

Endpoint Method Description
/search_face POST Upload an image or image URL to search for matching faces
/token_status POST Check your API key balance and remaining usage quota

🐍 Python Integration

1️⃣ Install Dependency

pip install gradio_client

2️⃣ Example Usage

from gradio_client import Client, handle_file

client = Client(API_HOST)

# 1. Search Face
result = client.predict(
    file=handle_file(IMAGE_FILE_PATH or URL),
    api_token=API_KEY,
    is_premium=True,
    api_name="/search_face"
)
print(result)

# 2. Token Balance
result = client.predict(
    token=API_KEY,
    api_name="/token_status"
)
print(result)

💻 JavaScript Integration

1️⃣ Install Dependency

npm i -D @gradio/client

2️⃣ Example Usage

import { Client } from "@gradio/client";

const client = await Client.connect(API_HOST);

// 1. Search Face
const response = await fetch(IMAGE_FILE_PATH or URL);
const exampleImage = await response.blob();

const result = await client.predict("/search_face", { 
    file: exampleImage, 
    api_token: API_KEY,
    is_premium: true,
});
console.log(result.data);

// 2. Token Balance
const balance = await client.predict("/token_status", { token: API_KEY });
console.log(balance.data);

🌀 Curl Integration

1️⃣ Search Face

curl -X POST API_HOST/gradio_api/call/search_face -s \
  -H "Content-Type: application/json" \
  -d '{"data": [{"path": IMAGE_URL}, API_KEY, true]}' \
  | awk -F'"' '{ print $4}' \
  | read EVENT_ID; curl -N API_HOST/gradio_api/call/search_face/$EVENT_ID

2️⃣ Token Balance

curl -X POST API_HOST/gradio_api/call/token_status -s \
  -H "Content-Type: application/json" \
  -d '{"data": [API_KEY]}' \
  | awk -F'"' '{ print $4}' \
  | read EVENT_ID; curl -N API_HOST/gradio_api/call/token_status/$EVENT_ID

📘 Notes

  • is_premium: Set to true if you have a premium plan.
  • IMAGE_FILE_PATH or URL: Can be a local file path or a public image URL.
  • Responses are returned in JSON.
  • Use /token_status to monitor your remaining balance.

About

Face Search API, Face Lookup, FaceCheck ID, Lenso-ai, Pimeyes

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published