{"openapi":"3.1.0","info":{"title":"JyCode API Gateway","description":"Единый защищённый API, который параллельно обращается к одиннадцати поисковым сервисам, ограничивает зависшие запросы и нормализует ответы.","version":"1.3.2"},"paths":{"/healthz":{"get":{"tags":["service"],"summary":"Healthz","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Healthz Healthz Get"}}}}}}},"/readyz":{"get":{"tags":["service"],"summary":"Readyz","operationId":"readyz_readyz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Readyz Readyz Get"}}}}}}},"/v1/types":{"get":{"tags":["metadata"],"summary":"Types","operationId":"types_v1_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Types V1 Types Get"}}}}}}},"/v1/providers":{"get":{"tags":["metadata"],"summary":"Providers","operationId":"providers_v1_providers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Providers V1 Providers Get"}}}}}}},"/v1/providers/status":{"get":{"tags":["metadata"],"summary":"Providers Status","operationId":"providers_status_v1_providers_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Providers Status V1 Providers Status Get"}}}}}}},"/v1/detect":{"post":{"tags":["search"],"summary":"Detect","operationId":"detect_v1_detect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectionResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/search":{"post":{"tags":["search"],"summary":"Search","operationId":"search_v1_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bigbase/open-dossier":{"post":{"tags":["bigbase"],"summary":"Bigbase Open Dossier","operationId":"bigbase_open_dossier_v1_bigbase_open_dossier_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BigBaseOpenDossierRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bigbase/random-dossier":{"post":{"tags":["bigbase"],"summary":"Bigbase Random Dossier","operationId":"bigbase_random_dossier_v1_bigbase_random_dossier_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BigBaseRandomDossierRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/face/search":{"post":{"tags":["search"],"summary":"Face Search","operationId":"face_search_v1_face_search_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_face_search_v1_face_search_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FaceSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/check":{"post":{"tags":["key-management"],"summary":"Auth Check","description":"Публичная проверка ключа + сверка устройства при запуске клиента.\n\nАвторизация — самим ключом (X-API-Key), без management token, без списания запроса.\nВозвращает статус/лимиты/имя/продукт. Используется десктопом/мобайл перед запуском.","operationId":"auth_check_v1_auth_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthCheckRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Auth Check V1 Auth Check Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys/create":{"post":{"tags":["key-management"],"summary":"Create Key","operationId":"create_key_v1_keys_create_post","parameters":[{"name":"X-Management-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Management-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Key V1 Keys Create Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys/validate":{"post":{"tags":["key-management"],"summary":"Validate Key","operationId":"validate_key_v1_keys_validate_post","parameters":[{"name":"X-Management-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Management-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Validate Key V1 Keys Validate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys/find":{"post":{"tags":["key-management"],"summary":"Find Key","operationId":"find_key_v1_keys_find_post","parameters":[{"name":"X-Management-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Management-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Find Key V1 Keys Find Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys/freeze":{"post":{"tags":["key-management"],"summary":"Freeze Key","operationId":"freeze_key_v1_keys_freeze_post","parameters":[{"name":"X-Management-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Management-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreezeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Freeze Key V1 Keys Freeze Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys/unfreeze":{"post":{"tags":["key-management"],"summary":"Unfreeze Key","operationId":"unfreeze_key_v1_keys_unfreeze_post","parameters":[{"name":"X-Management-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Management-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyIdRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Unfreeze Key V1 Keys Unfreeze Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys/devices/reset":{"post":{"tags":["key-management"],"summary":"Reset Device","operationId":"reset_device_v1_keys_devices_reset_post","parameters":[{"name":"X-Management-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Management-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetDeviceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reset Device V1 Keys Devices Reset Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys/devices":{"post":{"tags":["key-management"],"summary":"List Devices","operationId":"list_devices_v1_keys_devices_post","parameters":[{"name":"X-Management-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Management-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyIdRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Devices V1 Keys Devices Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/trial/issue":{"post":{"tags":["key-management"],"summary":"Issue Trial","operationId":"issue_trial_v1_trial_issue_post","parameters":[{"name":"X-Management-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Management-Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrialRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Issue Trial V1 Trial Issue Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AuthCheckRequest":{"properties":{"key":{"type":"string","maxLength":256,"minLength":1,"title":"Key"},"device_id":{"type":"string","maxLength":256,"minLength":1,"title":"Device Id"},"platform":{"type":"string","pattern":"^(pc|android)$","title":"Platform"},"ip":{"type":"string","maxLength":64,"title":"Ip","default":""},"user_agent":{"type":"string","maxLength":500,"title":"User Agent","default":""},"bind_device":{"type":"boolean","title":"Bind Device","default":true}},"type":"object","required":["key","device_id","platform"],"title":"AuthCheckRequest","description":"Публичная проверка ключа клиентом (десктоп/мобайл) при запуске.\n\nНе списывает запрос, не требует management token."},"BigBaseOpenDossierRequest":{"properties":{"record_id":{"type":"string","maxLength":300,"minLength":1,"title":"Record Id"}},"type":"object","required":["record_id"],"title":"BigBaseOpenDossierRequest"},"BigBaseRandomDossierRequest":{"properties":{"search":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Search"},"sex":{"type":"string","pattern":"^(any|male|female)$","title":"Sex","default":"any"},"year_from":{"anyOf":[{"type":"string","maxLength":4},{"type":"null"}],"title":"Year From"},"year_to":{"anyOf":[{"type":"string","maxLength":4},{"type":"null"}],"title":"Year To"}},"type":"object","title":"BigBaseRandomDossierRequest"},"Body_face_search_v1_face_search_post":{"properties":{"image":{"type":"string","contentMediaType":"application/octet-stream","title":"Image"}},"type":"object","required":["image"],"title":"Body_face_search_v1_face_search_post"},"CreateKeyRequest":{"properties":{"telegram_id":{"type":"integer","minimum":1.0,"title":"Telegram Id"},"username":{"type":"string","maxLength":128,"title":"Username","default":""},"display_name":{"type":"string","maxLength":128,"title":"Display Name","default":""},"product":{"type":"string","pattern":"^(web|apk|exe|all)$","title":"Product"},"duration_seconds":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Duration Seconds"},"period_limit":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Period Limit"},"period_seconds":{"type":"integer","minimum":1.0,"title":"Period Seconds","default":60},"total_limit":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Total Limit"},"notes":{"type":"string","maxLength":1000,"title":"Notes","default":""}},"type":"object","required":["telegram_id","product"],"title":"CreateKeyRequest"},"DetectRequest":{"properties":{"query":{"type":"string","maxLength":500,"minLength":1,"title":"Query"}},"type":"object","required":["query"],"title":"DetectRequest"},"DetectionResult":{"properties":{"query":{"type":"string","title":"Query"},"primary":{"$ref":"#/components/schemas/SearchType"},"candidates":{"items":{"$ref":"#/components/schemas/SearchType"},"type":"array","title":"Candidates"},"confident":{"type":"boolean","title":"Confident"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["query","primary","candidates","confident","reason"],"title":"DetectionResult"},"FaceMatch":{"properties":{"provider":{"$ref":"#/components/schemas/ProviderName"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"similarity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Similarity"},"similarity_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Similarity Text"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"profile_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Url"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"extra":{"additionalProperties":true,"type":"object","title":"Extra"}},"type":"object","required":["provider"],"title":"FaceMatch"},"FaceSearchResponse":{"properties":{"request_id":{"type":"string","title":"Request Id"},"status":{"type":"string","title":"Status"},"result_count":{"type":"integer","title":"Result Count"},"providers_ok":{"type":"integer","title":"Providers Ok"},"providers_failed":{"type":"integer","title":"Providers Failed"},"matches":{"items":{"$ref":"#/components/schemas/FaceMatch"},"type":"array","title":"Matches"},"provider_results":{"items":{"$ref":"#/components/schemas/ProviderResult"},"type":"array","title":"Provider Results"}},"type":"object","required":["request_id","status","result_count","providers_ok","providers_failed"],"title":"FaceSearchResponse"},"FindKeyRequest":{"properties":{"key":{"type":"string","maxLength":256,"minLength":1,"title":"Key"}},"type":"object","required":["key"],"title":"FindKeyRequest"},"FreezeRequest":{"properties":{"key_id":{"type":"integer","minimum":1.0,"title":"Key Id"},"reason":{"type":"string","maxLength":500,"title":"Reason","default":""}},"type":"object","required":["key_id"],"title":"FreezeRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"KeyIdRequest":{"properties":{"key_id":{"type":"integer","minimum":1.0,"title":"Key Id"}},"type":"object","required":["key_id"],"title":"KeyIdRequest"},"NormalizedRecord":{"properties":{"provider":{"$ref":"#/components/schemas/ProviderName"},"tool":{"type":"string","title":"Tool"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"database":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Database"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"},"actuality":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Actuality"},"fields":{"additionalProperties":true,"type":"object","title":"Fields"},"links":{"items":{"type":"string"},"type":"array","title":"Links"}},"type":"object","required":["provider","tool"],"title":"NormalizedRecord"},"ProviderError":{"properties":{"provider":{"$ref":"#/components/schemas/ProviderName"},"tool":{"type":"string","title":"Tool"},"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"retryable":{"type":"boolean","title":"Retryable","default":false}},"type":"object","required":["provider","tool","code","message"],"title":"ProviderError"},"ProviderName":{"type":"string","enum":["depsearch","nightsearch","jitler","raidfind","deepscan","onux","gloom","postauditory","bigbase","epic_search","nyx"],"title":"ProviderName"},"ProviderResult":{"properties":{"provider":{"$ref":"#/components/schemas/ProviderName"},"tool":{"type":"string","title":"Tool"},"ok":{"type":"boolean","title":"Ok"},"found":{"type":"boolean","title":"Found"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"latency_ms":{"type":"integer","title":"Latency Ms"},"records":{"items":{"$ref":"#/components/schemas/NormalizedRecord"},"type":"array","title":"Records"},"raw":{"anyOf":[{},{"type":"null"}],"title":"Raw"},"error":{"anyOf":[{"$ref":"#/components/schemas/ProviderError"},{"type":"null"}]}},"type":"object","required":["provider","tool","ok","found","latency_ms"],"title":"ProviderResult"},"ResetDeviceRequest":{"properties":{"key_id":{"type":"integer","minimum":1.0,"title":"Key Id"},"platform":{"type":"string","pattern":"^(pc|android)$","title":"Platform"}},"type":"object","required":["key_id","platform"],"title":"ResetDeviceRequest"},"SearchRequest":{"properties":{"query":{"type":"string","maxLength":500,"minLength":1,"title":"Query"},"search_type":{"$ref":"#/components/schemas/SearchType","default":"auto"},"providers":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProviderName"},"type":"array"},{"type":"null"}],"title":"Providers"},"page":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Page","default":1},"include_raw":{"type":"boolean","title":"Include Raw","default":true},"bypass_cache":{"type":"boolean","title":"Bypass Cache","default":false}},"type":"object","required":["query"],"title":"SearchRequest"},"SearchResponse":{"properties":{"request_id":{"type":"string","title":"Request Id"},"status":{"type":"string","title":"Status"},"query":{"type":"string","title":"Query"},"search_type":{"$ref":"#/components/schemas/SearchType"},"detected":{"anyOf":[{"$ref":"#/components/schemas/DetectionResult"},{"type":"null"}]},"result_count":{"type":"integer","title":"Result Count"},"providers_ok":{"type":"integer","title":"Providers Ok"},"providers_failed":{"type":"integer","title":"Providers Failed"},"cached":{"type":"boolean","title":"Cached","default":false},"records":{"items":{"$ref":"#/components/schemas/NormalizedRecord"},"type":"array","title":"Records"},"provider_results":{"items":{"$ref":"#/components/schemas/ProviderResult"},"type":"array","title":"Provider Results"}},"type":"object","required":["request_id","status","query","search_type","result_count","providers_ok","providers_failed"],"title":"SearchResponse"},"SearchType":{"type":"string","enum":["auto","phone","email","fio","telegram","vk","nick","ip","snils","inn","auto_vehicle","passport","ok","fb","tiktok","address","sherlock","funstat","card","imei","bdate","social"],"title":"SearchType"},"TrialRequest":{"properties":{"telegram_id":{"type":"integer","minimum":1.0,"title":"Telegram Id"},"username":{"type":"string","maxLength":128,"title":"Username","default":""},"display_name":{"type":"string","maxLength":128,"title":"Display Name","default":""},"product":{"type":"string","pattern":"^(web|apk|exe|all)$","title":"Product"},"ip":{"type":"string","maxLength":64,"minLength":1,"title":"Ip"},"device_id":{"type":"string","maxLength":256,"minLength":1,"title":"Device Id"},"platform":{"type":"string","pattern":"^(pc|android)$","title":"Platform"}},"type":"object","required":["telegram_id","product","ip","device_id","platform"],"title":"TrialRequest"},"ValidateKeyRequest":{"properties":{"key":{"type":"string","maxLength":256,"minLength":1,"title":"Key"},"device_id":{"type":"string","maxLength":256,"minLength":1,"title":"Device Id"},"platform":{"type":"string","pattern":"^(pc|android)$","title":"Platform"},"ip":{"type":"string","maxLength":64,"title":"Ip","default":""},"user_agent":{"type":"string","maxLength":500,"title":"User Agent","default":""},"bind_device":{"type":"boolean","title":"Bind Device","default":true}},"type":"object","required":["key","device_id","platform"],"title":"ValidateKeyRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}