{"openapi":"3.1.0","info":{"title":"Kenoscope","version":"0.1.0"},"paths":{"/":{"get":{"summary":"Home","operationId":"home__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/maps/{library_id}/{version}/{name}":{"get":{"summary":"Map File","operationId":"map_file_maps__library_id___version___name__get","parameters":[{"name":"library_id","in":"path","required":true,"schema":{"type":"string","title":"Library Id"}},{"name":"version","in":"path","required":true,"schema":{"type":"integer","title":"Version"}},{"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/libraries/{library_id}/passages/{passage_id}":{"get":{"summary":"Passage","operationId":"passage_api_libraries__library_id__passages__passage_id__get","parameters":[{"name":"library_id","in":"path","required":true,"schema":{"type":"string","title":"Library Id"}},{"name":"passage_id","in":"path","required":true,"schema":{"type":"integer","title":"Passage Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/libraries/{library_id}/points/{map_index}":{"get":{"summary":"Point","operationId":"point_api_libraries__library_id__points__map_index__get","parameters":[{"name":"library_id","in":"path","required":true,"schema":{"type":"string","title":"Library Id"}},{"name":"map_index","in":"path","required":true,"schema":{"type":"integer","title":"Map Index"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ask":{"post":{"summary":"Ask","description":"Server-sent events: evidence, then words as they are written, then each claim with its verdict.","operationId":"ask_api_ask_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/kenoscope__api__public__AskBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/pricing":{"get":{"summary":"Pricing","operationId":"pricing_pricing_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/docs":{"get":{"summary":"Docs","operationId":"docs_docs_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/accuracy":{"get":{"summary":"Accuracy","operationId":"accuracy_accuracy_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/signup":{"get":{"summary":"Signup Page","operationId":"signup_page_signup_get","parameters":[{"name":"invite","in":"query","required":false,"schema":{"type":"string","default":"","title":"Invite"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/login":{"get":{"summary":"Login Page","operationId":"login_page_login_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/auth/signup":{"post":{"summary":"Signup","operationId":"signup_auth_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Signup"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login":{"post":{"summary":"Login","operationId":"login_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Login"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/logout":{"post":{"summary":"Logout","operationId":"logout_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/auth/switch/{org_id}":{"post":{"summary":"Switch","operationId":"switch_auth_switch__org_id__post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/accept/{token}":{"post":{"summary":"Accept","operationId":"accept_auth_accept__token__post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/password":{"post":{"summary":"Change Password","operationId":"change_password_auth_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewPassword"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reset/{token}":{"get":{"summary":"Reset Page","operationId":"reset_page_reset__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/reset/{token}":{"post":{"summary":"Reset","operationId":"reset_auth_reset__token__post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewPassword"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/api/members/{user_id}/reset":{"post":{"summary":"Member Reset","description":"An admin hands a member a one-time link. Owners are reset by the operator, never by someone inside the organisation.","operationId":"member_reset_app_api_members__user_id__reset_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invite/{token}":{"get":{"summary":"Invite Page","operationId":"invite_page_invite__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app":{"get":{"summary":"Overview","operationId":"overview_app_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/app/library/{library_id}":{"get":{"summary":"Library Page","operationId":"library_page_app_library__library_id__get","parameters":[{"name":"library_id","in":"path","required":true,"schema":{"type":"string","title":"Library Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/keys":{"get":{"summary":"Keys Page","operationId":"keys_page_app_keys_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/app/members":{"get":{"summary":"Members Page","operationId":"members_page_app_members_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/app/usage":{"get":{"summary":"Usage Page","operationId":"usage_page_app_usage_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/app/settings":{"get":{"summary":"Settings Page","operationId":"settings_page_app_settings_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/app/api/libraries":{"post":{"summary":"Create Library","operationId":"create_library_app_api_libraries_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Name"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/api/libraries/{library_id}":{"delete":{"summary":"Delete Library","operationId":"delete_library_app_api_libraries__library_id__delete","parameters":[{"name":"library_id","in":"path","required":true,"schema":{"type":"string","title":"Library Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/api/libraries/{library_id}/documents":{"post":{"summary":"Upload","operationId":"upload_app_api_libraries__library_id__documents_post","parameters":[{"name":"library_id","in":"path","required":true,"schema":{"type":"string","title":"Library Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_app_api_libraries__library_id__documents_post"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/api/jobs/{job_id}":{"get":{"summary":"Job","operationId":"job_app_api_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/api/libraries/{library_id}/documents/{document_id}":{"delete":{"summary":"Delete Document","operationId":"delete_document_app_api_libraries__library_id__documents__document_id__delete","parameters":[{"name":"library_id","in":"path","required":true,"schema":{"type":"string","title":"Library Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/api/keys":{"post":{"summary":"Create Key","operationId":"create_key_app_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Name"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/api/keys/{key_id}":{"delete":{"summary":"Revoke Key","operationId":"revoke_key_app_api_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/api/invites":{"post":{"summary":"Invite","operationId":"invite_app_api_invites_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Role"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/api/members/{user_id}":{"patch":{"summary":"Change Role","operationId":"change_role_app_api_members__user_id__patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Role"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Remove Member","operationId":"remove_member_app_api_members__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/api/settings":{"patch":{"summary":"Settings","operationId":"settings_app_api_settings_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/api/upgrade":{"post":{"summary":"Upgrade","operationId":"upgrade_app_api_upgrade_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Upgrade"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin":{"get":{"summary":"Admin","operationId":"admin_admin_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/admin/api/upgrades/{request_id}":{"post":{"summary":"Decide","operationId":"decide_admin_api_upgrades__request_id__post","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Decision"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ask":{"post":{"summary":"Ask","operationId":"ask_v1_ask_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/kenoscope__api__v1__AskBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/libraries":{"get":{"summary":"Libraries","operationId":"libraries_v1_libraries_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/libraries/{ref}/gaps":{"get":{"summary":"Gaps","description":"What the library does not know: clusters of questions that found no evidence.","operationId":"gaps_v1_libraries__ref__gaps_get","parameters":[{"name":"ref","in":"path","required":true,"schema":{"type":"string","title":"Ref"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/libraries/{ref}/documents":{"post":{"summary":"Add Documents","description":"Upload documents (multipart field `files`). Indexing runs in the background: poll the returned job.","operationId":"add_documents_v1_libraries__ref__documents_post","parameters":[{"name":"ref","in":"path","required":true,"schema":{"type":"string","title":"Ref"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_add_documents_v1_libraries__ref__documents_post"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jobs/{job_id}":{"get":{"summary":"Job","operationId":"job_v1_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/usage":{"get":{"summary":"Usage","operationId":"usage_v1_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"Body_add_documents_v1_libraries__ref__documents_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_add_documents_v1_libraries__ref__documents_post"},"Body_upload_app_api_libraries__library_id__documents_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_upload_app_api_libraries__library_id__documents_post"},"Decision":{"properties":{"approve":{"type":"boolean","title":"Approve"}},"type":"object","required":["approve"],"title":"Decision"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Login":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"Login"},"Name":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"Name"},"NewPassword":{"properties":{"current":{"type":"string","title":"Current","default":""},"password":{"type":"string","title":"Password"}},"type":"object","required":["password"],"title":"NewPassword"},"Role":{"properties":{"role":{"type":"string","title":"Role"}},"type":"object","required":["role"],"title":"Role"},"Settings":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"strict_mode":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Strict Mode"}},"type":"object","title":"Settings"},"Signup":{"properties":{"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"password":{"type":"string","title":"Password"},"organisation":{"type":"string","title":"Organisation","default":""},"invite":{"type":"string","title":"Invite","default":""}},"type":"object","required":["email","name","password"],"title":"Signup"},"Upgrade":{"properties":{"plan":{"type":"string","title":"Plan"},"note":{"type":"string","maxLength":1000,"title":"Note","default":""}},"type":"object","required":["plan"],"title":"Upgrade"},"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"},"kenoscope__api__public__AskBody":{"properties":{"library_id":{"type":"string","title":"Library Id"},"question":{"type":"string","maxLength":1500,"minLength":1,"title":"Question"}},"type":"object","required":["library_id","question"],"title":"AskBody"},"kenoscope__api__v1__AskBody":{"properties":{"question":{"type":"string","maxLength":1500,"minLength":1,"title":"Question"},"library":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Library"},"stream":{"type":"boolean","title":"Stream","default":false}},"type":"object","required":["question"],"title":"AskBody"}}}}