API Reference
Visage provides both REST and WebSocket APIs for face recognition functionality.
Base URL
http://localhost:8000/api/v1
Authentication
Currently, Visage runs on localhost without authentication. For production deployments, implement proper authentication.
Available Endpoints
REST Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /health | Health check |
| POST | /register | Register a new person |
| GET | /persons | List all registered persons |
| GET | /persons/{id} | Get person details |
| DELETE | /persons/{id} | Delete a person |
| POST | /identify | Identify a face from image |
WebSocket Endpoints
| Endpoint | Description |
|---|---|
/ws/identify | Real-time face identification stream |
Response Format
All REST endpoints return JSON responses:
{
"success": true,
"data": {
// Response data
},
"error": null
}
Error responses:
{
"success": false,
"data": null,
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message"
}
}
Rate Limiting
No rate limiting is currently implemented. Consider adding rate limiting for production use.
Next Steps
- Register API - Learn about person registration
- WebSocket API - Real-time identification