# Getting Started - Web APIs

Quick start guide for integrating VerifEye Web APIs into your applications.

# 📋 Prerequisites

  • A VerifEye account and API key
  • HTTP client library (curl, axios, requests, etc.)
  • Basic understanding of REST APIs
  • HTTPS support in your application

# 🔐 Authentication

All API requests require authentication using your API key:

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

# 🌍 API Endpoints

Choose the region closest to your users for best performance:

Region Base URL
US East https://api-us-east.verifeye.com/v1
US West https://api-us-west.verifeye.com/v1
Europe https://api-eu.verifeye.com/v1
Asia Pacific https://api-ap.verifeye.com/v1

# 🚀 Quick Start

# cURL Example

curl -X POST https://api-us-east.verifeye.com/v1/face/liveness \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "base64_encoded_image_data"
  }'

# JavaScript (Node.js)

const axios = require('axios');
const fs = require('fs');

const apiKey = 'YOUR_API_KEY';
const imageBase64 = fs.readFileSync('face.jpg', 'base64');

axios.post('https://api-us-east.verifeye.com/v1/face/liveness', {
  image: imageBase64
}, {
  headers: {
    'Authorization': `Bearer ${apiKey}`,
    'Content-Type': 'application/json'
  }
})
.then(response => {
  console.log('Result:', response.data);
})
.catch(error => {
  console.error('Error:', error.response.data);
});

# Python

import requests
import base64

api_key = 'YOUR_API_KEY'
url = 'https://api-us-east.verifeye.com/v1/face/liveness'

# Read and encode image
with open('face.jpg', 'rb') as f:
    image_base64 = base64.b64encode(f.read()).decode('utf-8')

headers = {
    'Authorization': f'Bearer {api_key}',
    'Content-Type': 'application/json'
}

data = {
    'image': image_base64
}

response = requests.post(url, json=data, headers=headers)
result = response.json()
print('Result:', result)

# C# (.NET)

using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

var apiKey = "YOUR_API_KEY";
var url = "https://api-us-east.verifeye.com/v1/face/liveness";

using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {apiKey}");

var imageBase64 = Convert.ToBase64String(File.ReadAllBytes("face.jpg"));
var data = new { image = imageBase64 };
var json = JsonConvert.SerializeObject(data);
var content = new StringContent(json, Encoding.UTF8, "application/json");

var response = await client.PostAsync(url, content);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);

# 📊 Response Format

# Success Response

{
  "success": true,
  "data": {
    "is_live": true,
    "confidence": 0.98,
    "face_detected": true,
    "face_bounds": {
      "x": 120,
      "y": 80,
      "width": 200,
      "height": 250
    }
  },
  "request_id": "req_1234567890"
}

# Error Response

{
  "success": false,
  "error": {
    "code": "INVALID_IMAGE",
    "message": "The provided image format is not supported",
    "details": "Supported formats: JPEG, PNG, WebP"
  },
  "request_id": "req_1234567890"
}

# 📚 Next Steps

Explore the Web API features:

  • Face Liveness Detection
  • Face Match Verification
  • Face Search
  • DeepFake Detection
  • Age/Gender Verification

# 🆘 Need Help?

Contact Us
../../contact/


Last updated: 2025-01-13