AVF Status
Check the processing status and retrieve results for a previously submitted AVF inference request. This endpoint supports both regular JSON responses and Server-Sent Events (SSE) for real-time updates.
Endpoint
GET /api-gateway/avf/status/:request_idAuthentication
Requires a valid JWT token in the Authorization header.
Authorization: Bearer <your-jwt-token>Path Parameters
| Parameter | Type | Description |
|---|---|---|
request_id | string | The unique request ID returned from the AVF Infer endpoint |
Example Request
curl -N 'https://api.biometrysolutions.com/api-gateway/avf/status/246fcaf1-0c88-4b21-a96c-05cabefcef55' \ -H 'Authorization: Bearer <your-jwt-token>'Response Behaviour
The endpoint behaviour depends on the request status:
If already completed or failed: Returns a standard JSON response immediately.
If still processing: Establishes an SSE connection and streams status updates until completion or timeout.
JSON Response (Completed)
Status: 200 OK
{ "request_id": "246fcaf1-0c88-4b21-a96c-05cabefcef55", "project_id": "your-project", "source_filename": "video.mp4", "status": "completed", "created_at": 1763007610, "completed_at": 1763008367, "result": { "success": true, "message": "Inference completed successfully", "prediction": "fake", "confidence": 1.35, "score": 1.35, "metadata": { "video_path": "/tmp/avf_4ps32fdq/video.mp4", "sequence_length": 50, "video_frames": 134, "request_id": "246fcaf1-0c88-4b21-a96c-05cabefcef55", "source_filename": "video.mp4" } }}SSE Response (Processing)
When the request is still being processed, the endpoint streams status updates:
data: {"request_id":"246fcaf1-0c88-4b21-a96c-05cabefcef55","status":"pending","created_at":1763007610}
data: {"request_id":"246fcaf1-0c88-4b21-a96c-05cabefcef55","status":"completed","result":{...}}Response Fields
| Field | Type | Description |
|---|---|---|
request_id | string | Unique identifier for the request |
project_id | string | Your project identifier |
source_filename | string | Original filename of the uploaded video |
status | string | Current status: pending, processing, completed, or failed |
created_at | number | Unix timestamp when request was created |
completed_at | number | Unix timestamp when processing completed (only present when completed) |
result | object | Analysis results (only present when completed) |
result.prediction | string | Classification: real or fake |
result.confidence | number | Confidence score |
result.score | number | Numerical forgery score |
Status Values
| Status | Description |
|---|---|
pending | Request received, queued for processing |
processing | Video is currently being analysed |
completed | Analysis finished successfully |
failed | Analysis failed (check error message) |
Error Responses
| Status | Description |
|---|---|
401 Unauthorized | Missing or invalid JWT token |
404 Not Found | Request ID not found |
500 Internal Server Error | Server error |
Timeout
- SSE connections timeout after 5 minutes
- Processing typically completes within 1-2 minutes
Client Implementation Tips
- For web clients: Use the EventSource API to handle SSE streams
- For mobile/backend: Poll every 2-5 seconds if SSE is not supported
- Always handle: Both immediate JSON responses and SSE streams
// JavaScript example using EventSourceconst eventSource = new EventSource( 'https://api.biometrysolutions.com/api-gateway/avf/status/request-id', { headers: { 'Authorization': 'Bearer token' } });
eventSource.onmessage = (event) => { const data = JSON.parse(event.data); if (data.status === 'completed') { console.log('Result:', data.result); eventSource.close(); }};