{"openapi":"3.1.0","info":{"title":"Face Recognition SDK Demo","description":"Face recognition (vision.face) and Vietnamese document OCR (vision.ocr), on-premise.","version":"1.1.0"},"paths":{"/api/status":{"get":{"tags":["Project"],"summary":"Status","description":"Health check: active model and threshold, start-up timings, machine, limits.","operationId":"status_api_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/models":{"get":{"tags":["Face"],"summary":"List Models","description":"All known recognition models, which are enabled, and which one is active.","operationId":"list_models_api_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/models/active":{"put":{"tags":["Face"],"summary":"Set Active Model","description":"Switch the recognition model. Gallery photos are re-embedded for it where possible.","operationId":"set_active_model_api_models_active_put","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/detect":{"post":{"tags":["Face"],"summary":"Detect","description":"Find every face: box, confidence, 68 landmarks, head pose and passive liveness.","operationId":"detect_api_detect_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_detect_api_detect_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/verify":{"post":{"tags":["Face"],"summary":"Verify","description":"Compare the most prominent face in `source` with every face in `target`.","operationId":"verify_api_verify_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_verify_api_verify_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/recognize":{"post":{"tags":["Face"],"summary":"Recognize","description":"Identify every face against the gallery: top matches with similarity and profile, plus liveness.","operationId":"recognize_api_recognize_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_recognize_api_recognize_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/subjects":{"get":{"tags":["Face"],"summary":"List Subjects","description":"All people in the gallery with their profile and face photos.","operationId":"list_subjects_api_subjects_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Face"],"summary":"Add Subject Example","description":"Enrol the largest face in the image as a photo of `subject` (created if new), embedded with\nevery enabled model so switching models keeps working. Filled-in personal-information\nfields are saved to (or update) the profile.","operationId":"add_subject_example_api_subjects_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_add_subject_example_api_subjects_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/subjects/{subject}":{"get":{"tags":["Face"],"summary":"Get Subject","description":"One person: profile and face photos.","operationId":"get_subject_api_subjects__subject__get","parameters":[{"name":"subject","in":"path","required":true,"schema":{"type":"string","title":"Subject"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Face"],"summary":"Update Subject","description":"Replace a person's personal information; pass `subject` in the body to rename them.","operationId":"update_subject_api_subjects__subject__put","parameters":[{"name":"subject","in":"path","required":true,"schema":{"type":"string","title":"Subject"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Face"],"summary":"Delete Subject","description":"Remove a person and all their photos.","operationId":"delete_subject_api_subjects__subject__delete","parameters":[{"name":"subject","in":"path","required":true,"schema":{"type":"string","title":"Subject"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/subjects/{subject}/{image_id}":{"delete":{"tags":["Face"],"summary":"Delete Example","description":"Remove one face photo of a person (the last photo removes the person).","operationId":"delete_example_api_subjects__subject___image_id__delete","parameters":[{"name":"subject","in":"path","required":true,"schema":{"type":"string","title":"Subject"}},{"name":"image_id","in":"path","required":true,"schema":{"type":"string","title":"Image Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/liveness":{"post":{"tags":["Face"],"summary":"Passive Liveness","description":"Passive liveness for every face in one photo (is it a real face or a photo / screen?).","operationId":"passive_liveness_api_liveness_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_passive_liveness_api_liveness_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/liveness/sessions":{"post":{"tags":["Face"],"summary":"Start Liveness Session","description":"Start an active-liveness check: a random order of head turns and a blink.","operationId":"start_liveness_session_api_liveness_sessions_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/liveness/sessions/{session_id}/frame":{"post":{"tags":["Face"],"summary":"Liveness Frame","description":"Feed one camera frame to a session. When all challenges are done the server also checks that\nthe passive score held up (median over the session) and that the face is the same person as at\nthe start, then recognises them against the gallery.","operationId":"liveness_frame_api_liveness_sessions__session_id__frame_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_liveness_frame_api_liveness_sessions__session_id__frame_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ocr/models":{"get":{"tags":["OCR"],"summary":"List Ocr Models","description":"VietOCR line-recognition models: installed, enabled and the active one.","operationId":"list_ocr_models_api_ocr_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/ocr/models/active":{"put":{"tags":["OCR"],"summary":"Set Active Ocr Model","description":"Switch the OCR recognition model used when a request names none.","operationId":"set_active_ocr_model_api_ocr_models_active_put","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ocr/document":{"post":{"tags":["OCR"],"summary":"Read Document","description":"Read a document: an image (JPG, PNG, ...) or a PDF (first `max_pages` pages, at most 10). Each page has\nits text lines (box as 4 corner points, text, confidence 0-1, row) in reading order and its full text.\nPDF pages also return a preview image, since the browser cannot draw them itself.","operationId":"read_document_api_ocr_document_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_read_document_api_ocr_document_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ocr/idcard":{"post":{"tags":["OCR"],"summary":"Read Id Card","description":"Read the front of a Vietnamese citizen ID card (CCCD): fields from the QR code and the printed labels,\neach with its source (\"qr\" or \"ocr\"). The portrait is located with face detection and compared with\nthe gallery and, if given, with a `selfie` (same-person similarity and liveness of the selfie).","operationId":"read_id_card_api_ocr_idcard_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_read_id_card_api_ocr_idcard_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ocr/doctypes":{"get":{"tags":["OCR"],"summary":"List Doctypes","description":"Document types with their fields, grouped as in the OCR menu, and sample images (fictitious).","operationId":"list_doctypes_api_ocr_doctypes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/ocr/extract":{"post":{"tags":["OCR"],"summary":"Extract Document","description":"Read one document photo or scan (or the first page of a PDF) as a given type, or detect the type\n(`doc_type=auto`). Steps: find and flatten the document, turn it upright, OCR, MRZ / QR, fields,\nquality checks and fraud warnings. Coordinates of fields and lines refer to `processed_image`;\n`alignment.quad` refers to the uploaded image. Documents with a holder's photo (CCCD / CMND front, passport,\ndriving licence) also get `portrait` (largest face, gallery matches) and, with a `selfie`, `face_match`\n(same-person similarity, selfie liveness) - the eKYC check.","operationId":"extract_document_api_ocr_extract_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_extract_document_api_ocr_extract_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ocr/table":{"post":{"tags":["OCR"],"summary":"Read Table Image","description":"Table image (or the first page of a PDF) -> cells. Bordered tables are split along their ruled lines,\nborderless ones by SLANet+; every cell is read on its own. `format=xlsx` returns the Excel workbook,\n`format=csv` a CSV file, otherwise JSON (rows, cells with row / col / rowspan / colspan / box).","operationId":"read_table_image_api_ocr_table_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_read_table_image_api_ocr_table_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ocr/eval":{"get":{"tags":["OCR"],"summary":"Ocr Eval Results","description":"Aggregate OCR accuracy from bench/ocr_eval.py (synthetic robustness set and, if run, real images).","operationId":"ocr_eval_results_api_ocr_eval_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/backtests":{"get":{"tags":["Project"],"summary":"List Backtests","description":"Backtest runs, newest first: title, task, dataset, size, pass count and headline metrics.","operationId":"list_backtests_api_backtests_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/backtests/{run_id}/items":{"get":{"tags":["Project"],"summary":"Backtest Items","description":"Items of one run. Filters: `status` (pass / fail), `subset`, `field` (a wrong field, for field runs),\n`q` (text search in every value). `sort` by any column key; `desc` for descending. Facet counts are\ncomputed on the items matching the other filters.","operationId":"backtest_items_api_backtests__run_id__items_get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"subset","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subset"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"field","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field"}},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort"}},{"name":"desc","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Desc"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/backtests/{run_id}/image/{name}":{"get":{"tags":["Project"],"summary":"Backtest Image","description":"The image of one item (datasets without personal data only).","operationId":"backtest_image_api_backtests__run_id__image__name__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/camera/models":{"get":{"tags":["Camera AI"],"summary":"List Camera Models","description":"Camera AI models per task (detect / pose / segment) with licence and whether the weights are installed.","operationId":"list_camera_models_api_camera_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/camera/detect":{"post":{"tags":["Camera AI"],"summary":"Detect Objects","description":"Objects in an image or video frame: label, confidence and box, plus counts per label.\n`classes`: comma-separated COCO names to keep (empty = all 80).","operationId":"detect_objects_api_camera_detect_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_detect_objects_api_camera_detect_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/camera/pose":{"post":{"tags":["Camera AI"],"summary":"Detect Pose","description":"People with 17 body keypoints [x, y, score] (COCO order, see /api/camera/models).","operationId":"detect_pose_api_camera_pose_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_detect_pose_api_camera_pose_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/camera/segment":{"post":{"tags":["Camera AI"],"summary":"Segment Objects","description":"Objects with their outline polygon (instance segmentation).","operationId":"segment_objects_api_camera_segment_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_segment_objects_api_camera_segment_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/camera/privacy":{"post":{"tags":["Camera AI"],"summary":"Privacy Mask","description":"Hide faces (face detector + heads from the pose model), licence plates / text on vehicles, or whole\npeople (segmentation outline). `style`: blur | pixelate | fill. Returns the masked JPEG and the regions.","operationId":"privacy_mask_api_camera_privacy_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_privacy_mask_api_camera_privacy_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/camera/sessions":{"post":{"tags":["Camera AI"],"summary":"Create Session","description":"Start tracking one stream: returns a session id for /frame. Sessions end after 2 minutes without frames.","operationId":"create_session_api_camera_sessions_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_create_session_api_camera_sessions_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/camera/sessions/{sid}/frame":{"post":{"tags":["Camera AI"],"summary":"Session Frame","description":"Detect + track one frame. `t`: the frame's time in seconds (video time; default: server clock).\n`line`: [[x1, y1], [x2, y2]] and `zone`: [[x, y] x 3..32], fractions of the frame. Returns tracked objects\n(track_id, in_zone, dwell_s), line counts in/out per class, zone entries, unique IDs per class and events.","operationId":"session_frame_api_camera_sessions__sid__frame_post","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","title":"Sid"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_session_frame_api_camera_sessions__sid__frame_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/camera/sessions/{sid}":{"delete":{"tags":["Camera AI"],"summary":"End Session","description":"Stop tracking (sessions also expire on their own).","operationId":"end_session_api_camera_sessions__sid__delete","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","title":"Sid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/camera/safety/catalog":{"get":{"tags":["Camera AI"],"summary":"Safety Catalog","description":"Domains and check items of the Safety page (left menu), the PPE model's classes with labels, and models.","operationId":"safety_catalog_api_camera_safety_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/camera/safety":{"post":{"tags":["Camera AI"],"summary":"Safety Check","description":"PPE check of one photo or frame: the item's objects, every worker with the state of each required PPE\n(\"ok\" seen worn, \"missing\" seen absent, \"unseen\"), status ok / violation / unknown, and totals.","operationId":"safety_check_api_camera_safety_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_safety_check_api_camera_safety_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/camera/safety/sessions":{"post":{"tags":["Camera AI"],"summary":"Safety Session","description":"Start a PPE check over a video: workers keep an ID and their violation time adds up.","operationId":"safety_session_api_camera_safety_sessions_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_safety_session_api_camera_safety_sessions_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/camera/safety/sessions/{sid}/frame":{"post":{"tags":["Camera AI"],"summary":"Safety Frame","description":"One frame of a PPE session: as /api/camera/safety, plus track_id and violation_s per worker, workers and\nviolators seen so far, and events (a worker first seen missing an item).","operationId":"safety_frame_api_camera_safety_sessions__sid__frame_post","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","title":"Sid"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_safety_frame_api_camera_safety_sessions__sid__frame_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/camera/safety/sessions/{sid}":{"delete":{"tags":["Camera AI"],"summary":"End Safety Session","operationId":"end_safety_session_api_camera_safety_sessions__sid__delete","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","title":"Sid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/camera/video/fetch":{"post":{"tags":["Camera AI"],"summary":"Fetch Video","operationId":"fetch_video_api_camera_video_fetch_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_fetch_video_api_camera_video_fetch_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/camera/video/{vid}.mp4":{"get":{"tags":["Camera AI"],"summary":"Cached Video","operationId":"cached_video_api_camera_video__vid__mp4_get","parameters":[{"name":"vid","in":"path","required":true,"schema":{"type":"string","title":"Vid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/camera/rtsp/open":{"post":{"tags":["Camera AI"],"summary":"Rtsp Open","description":"Connect to an IP camera by its RTSP address and start reading it.","operationId":"rtsp_open_api_camera_rtsp_open_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_rtsp_open_api_camera_rtsp_open_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/camera/rtsp/{sid}/frame.jpg":{"get":{"tags":["Camera AI"],"summary":"Rtsp Frame","description":"The newest frame of an open camera.","operationId":"rtsp_frame_api_camera_rtsp__sid__frame_jpg_get","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","title":"Sid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/camera/rtsp/{sid}/close":{"post":{"tags":["Camera AI"],"summary":"Rtsp Close","operationId":"rtsp_close_api_camera_rtsp__sid__close_post","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string","title":"Sid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/benchmarks":{"get":{"tags":["Project"],"summary":"List Benchmarks","description":"Result sets written by bench/run.sh (bench/results/<id>/results.json), newest first.","operationId":"list_benchmarks_api_benchmarks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/benchmarks/{run_id}":{"get":{"tags":["Project"],"summary":"Get Benchmark","description":"One benchmark result set (results.json written by bench/run.sh).","operationId":"get_benchmark_api_benchmarks__run_id__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/benchmarks/{run_id}/{kind}":{"get":{"tags":["Project"],"summary":"Get Benchmark File","description":"Other files of a result set: stress (bench/stress.py), simulation (bench/simulate.py), profile.","operationId":"get_benchmark_file_api_benchmarks__run_id___kind__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"kind","in":"path","required":true,"schema":{"type":"string","title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_add_subject_example_api_subjects_post":{"properties":{"subject":{"type":"string","title":"Subject"},"file":{"type":"string","format":"binary","title":"File"},"person_id":{"type":"string","title":"Person Id","default":""},"department":{"type":"string","title":"Department","default":""},"title":{"type":"string","title":"Title","default":""},"email":{"type":"string","title":"Email","default":""},"phone":{"type":"string","title":"Phone","default":""},"date_of_birth":{"type":"string","title":"Date Of Birth","default":""},"notes":{"type":"string","title":"Notes","default":""}},"type":"object","required":["subject","file"],"title":"Body_add_subject_example_api_subjects_post"},"Body_create_session_api_camera_sessions_post":{"properties":{"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"classes":{"type":"string","title":"Classes","default":"person,bicycle,car,motorcycle,bus,truck"},"conf":{"type":"number","title":"Conf","default":0.3}},"type":"object","title":"Body_create_session_api_camera_sessions_post"},"Body_detect_api_detect_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"limit":{"type":"integer","title":"Limit","default":10},"liveness":{"type":"boolean","title":"Liveness","default":true}},"type":"object","required":["file"],"title":"Body_detect_api_detect_post"},"Body_detect_objects_api_camera_detect_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"conf":{"type":"number","title":"Conf","default":0.35},"classes":{"type":"string","title":"Classes","default":""}},"type":"object","required":["file"],"title":"Body_detect_objects_api_camera_detect_post"},"Body_detect_pose_api_camera_pose_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"conf":{"type":"number","title":"Conf","default":0.35}},"type":"object","required":["file"],"title":"Body_detect_pose_api_camera_pose_post"},"Body_extract_document_api_ocr_extract_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"doc_type":{"type":"string","title":"Doc Type","default":"auto"},"align":{"type":"boolean","title":"Align","default":true},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"selfie":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"Selfie"},"face_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Face Model"}},"type":"object","required":["file"],"title":"Body_extract_document_api_ocr_extract_post"},"Body_fetch_video_api_camera_video_fetch_post":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"Body_fetch_video_api_camera_video_fetch_post"},"Body_liveness_frame_api_liveness_sessions__session_id__frame_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_liveness_frame_api_liveness_sessions__session_id__frame_post"},"Body_passive_liveness_api_liveness_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_passive_liveness_api_liveness_post"},"Body_privacy_mask_api_camera_privacy_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"targets":{"type":"string","title":"Targets","default":"faces,plates"},"style":{"type":"string","title":"Style","default":"blur"}},"type":"object","required":["file"],"title":"Body_privacy_mask_api_camera_privacy_post"},"Body_read_document_api_ocr_document_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"max_pages":{"type":"integer","title":"Max Pages","default":5}},"type":"object","required":["file"],"title":"Body_read_document_api_ocr_document_post"},"Body_read_id_card_api_ocr_idcard_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"selfie":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"Selfie"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"face_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Face Model"}},"type":"object","required":["file"],"title":"Body_read_id_card_api_ocr_idcard_post"},"Body_read_table_image_api_ocr_table_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"format":{"type":"string","title":"Format","default":"json"}},"type":"object","required":["file"],"title":"Body_read_table_image_api_ocr_table_post"},"Body_recognize_api_recognize_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"prediction_count":{"type":"integer","title":"Prediction Count","default":3},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"liveness":{"type":"boolean","title":"Liveness","default":true}},"type":"object","required":["file"],"title":"Body_recognize_api_recognize_post"},"Body_rtsp_open_api_camera_rtsp_open_post":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"Body_rtsp_open_api_camera_rtsp_open_post"},"Body_safety_check_api_camera_safety_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"item":{"type":"string","title":"Item","default":"overview"},"required":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"conf":{"type":"number","title":"Conf","default":0.35}},"type":"object","required":["file"],"title":"Body_safety_check_api_camera_safety_post"},"Body_safety_frame_api_camera_safety_sessions__sid__frame_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"item":{"type":"string","title":"Item","default":"overview"},"required":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required"},"t":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"T"}},"type":"object","required":["file"],"title":"Body_safety_frame_api_camera_safety_sessions__sid__frame_post"},"Body_safety_session_api_camera_safety_sessions_post":{"properties":{"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"conf":{"type":"number","title":"Conf","default":0.35}},"type":"object","title":"Body_safety_session_api_camera_safety_sessions_post"},"Body_segment_objects_api_camera_segment_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"conf":{"type":"number","title":"Conf","default":0.35},"classes":{"type":"string","title":"Classes","default":""}},"type":"object","required":["file"],"title":"Body_segment_objects_api_camera_segment_post"},"Body_session_frame_api_camera_sessions__sid__frame_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"t":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"T"},"line":{"type":"string","title":"Line","default":""},"zone":{"type":"string","title":"Zone","default":""}},"type":"object","required":["file"],"title":"Body_session_frame_api_camera_sessions__sid__frame_post"},"Body_verify_api_verify_post":{"properties":{"source":{"type":"string","format":"binary","title":"Source"},"target":{"type":"string","format":"binary","title":"Target"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"liveness":{"type":"boolean","title":"Liveness","default":true}},"type":"object","required":["source","target"],"title":"Body_verify_api_verify_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}