Authorization
Manage user API tokens using AI-FORENSIX Authorization endpoints
Authorization & API Key Management
Forensix AI uses API Keys to authenticate all Deepfake Detection services. Every request must include a valid API key, which is created either from the user dashboard or via dedicated API endpoints.
This document explains how to generate API keys, how they work, and how to use them with detection services.
1. Generate a New API Key
You can generate a new API Key that is bound to specific service scopes (such as image, video, audio, or face verification).
Endpoint
POST /api-keys/generateHeaders
Content-Type: application/jsonBody Example
{
"user_id": 89,
"serviceIds": [1, 2, 3]
}This tells Forensix that user 89 wants an API key that grants access to services 1, 2, and 3.
Success Response
{
"api_key": "82b7.......",
"success": true,
"assigned_services": [1, 2, 3]
}The api_key returned here is what you will use in all detection-related requests.
Shell Example
curl -X POST "https://forensiz.ai/generate" \
-H "Content-Type: application/json" \
-d '{"user_id": 89, "serviceIds": [1, 2, 3]}'2. Using API Keys for Detection Services
All Forensix AI detection endpoints require the following header:
x-api-key: YOUR_API_KEYExample Request
curl -X POST "https://forensiz.ai/detect" \
-H "x-api-key: 800.2..." \
-F "file=@image.jpg"This example triggers an image deepfake detection task using your generated API key.
API Keys act as your identity + permissions, so keep them secure and never expose them publicly.