{"openapi":"3.1.0","info":{"title":"Open Paper","description":"A web application for uploading and annotating papers.","version":"1.0.0"},"paths":{"/api/health":{"get":{"summary":"Health Check","description":"Health check endpoint to verify the API is running","operationId":"health_check_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/me":{"get":{"summary":"Get Me","description":"Get the current user.","operationId":"get_me_api_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/auth/profile":{"patch":{"summary":"Update Profile","description":"Update the current user's profile.","operationId":"update_profile_api_auth_profile_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/auth/topics":{"get":{"summary":"Get Topics","description":"Get the list of topics for the current user.\nThis can be used to fetch user-specific topics or general topics.","operationId":"get_topics_api_auth_topics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/auth/logout":{"get":{"summary":"Logout","description":"Logout the current user.","operationId":"logout_api_auth_logout_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"all_devices","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"All Devices"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/google/login":{"get":{"summary":"Google Login","description":"Start Google OAuth flow.","operationId":"google_login_api_auth_google_login_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/google/callback":{"get":{"summary":"Google Callback","description":"Handle Google OAuth callback.\n\nEvery parameter is optional because we do not control who calls this. Google\nsends `error` instead of `code` when the user declines at the consent\nscreen, and link scanners re-fetch the URL with a code that has already been\nspent. Requiring `code` turned both into a raw 422.","operationId":"google_callback_api_auth_google_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"307":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/zotero/connect":{"get":{"summary":"Zotero Connect","description":"Start Zotero OAuth flow for an authenticated user.","operationId":"zotero_connect_api_auth_zotero_connect_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZoteroConnectResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/auth/zotero/callback":{"get":{"summary":"Zotero Callback","description":"Handle Zotero OAuth callback and store the API key.","operationId":"zotero_callback_api_auth_zotero_callback_get","parameters":[{"name":"oauth_token","in":"query","required":true,"schema":{"type":"string","title":"Oauth Token"}},{"name":"oauth_verifier","in":"query","required":true,"schema":{"type":"string","title":"Oauth Verifier"}}],"responses":{"307":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/zotero/status":{"get":{"summary":"Zotero Status","description":"Return whether the current user has a linked Zotero account.","operationId":"zotero_status_api_auth_zotero_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZoteroStatusResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/auth/zotero/disconnect":{"delete":{"summary":"Zotero Disconnect","description":"Remove the linked Zotero account for the current user.","operationId":"zotero_disconnect_api_auth_zotero_disconnect_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZoteroDisconnectResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/auth/email/signin":{"post":{"summary":"Email Signin","description":"Initiate email sign-in by sending a 6-digit verification code.\nCreates user if they don't exist.","operationId":"email_signin_api_auth_email_signin_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSignInRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/email/fullname":{"post":{"summary":"Email Set Name","description":"Set name for email user if they don't have one.","operationId":"email_set_name_api_auth_email_fullname_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSetNameRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/email/verify":{"post":{"summary":"Email Verify","description":"Verify email with 6-digit code and create session.","operationId":"email_verify_api_auth_email_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/admin/block":{"post":{"summary":"Block User","description":"Block or unblock a user. Admin only.","operationId":"block_user_api_auth_admin_block_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockUserRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/paper/all":{"get":{"summary":"Get Paper Ids","description":"Get all paper IDs","operationId":"get_paper_ids_api_paper_all_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"detailed","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Detailed"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/paper/active":{"get":{"summary":"Get Active Paper Ids","description":"Get all active paper IDs","operationId":"get_active_paper_ids_api_paper_active_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/paper/pending-jobs":{"get":{"summary":"Get User Pending Jobs","description":"Get the user's in-progress upload jobs across their whole library, so the\nLibrary page can rehydrate the upload tracker after a refresh. Dead jobs are\nfiltered out server-side (see STALE_UPLOAD_JOB_CUTOFF).","operationId":"get_user_pending_jobs_api_paper_pending_jobs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/paper/{id}/file-url":{"get":{"summary":"Get Paper File Url","description":"Get a fresh presigned file URL for a single owned paper.\n\nThis is the cheap path for \"my URL expired, give me a fresh one\" — it\navoids the metadata enrichment and full document payload (raw_content,\netc.) that GET /api/paper returns.","operationId":"get_paper_file_url_api_paper__id__file_url_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/paper/note":{"get":{"summary":"Get Paper Note","description":"Get the paper note associated with this document.","operationId":"get_paper_note_api_paper_note_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"paper_id","in":"query","required":true,"schema":{"type":"string","title":"Paper Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Paper Note","description":"Create the paper note associated with this document","operationId":"create_paper_note_api_paper_note_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"paper_id","in":"query","required":true,"schema":{"type":"string","title":"Paper Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaperNoteSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Update Paper Note","description":"Update the paper note associated with this document","operationId":"update_paper_note_api_paper_note_put","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"paper_id","in":"query","required":true,"schema":{"type":"string","title":"Paper Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePaperNoteSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/paper/status":{"post":{"summary":"Set Paper Status","description":"Set the status of a paper","operationId":"set_paper_status_api_paper_status_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"paper_id","in":"query","required":true,"schema":{"type":"string","title":"Paper Id"}},{"name":"status","in":"query","required":true,"schema":{"$ref":"#/components/schemas/PaperStatus"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/paper":{"patch":{"summary":"Update Paper Fields","description":"Update editable fields of a paper (title, authors, abstract, etc.)","operationId":"update_paper_fields_api_paper_patch","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"paper_id","in":"query","required":true,"schema":{"type":"string","title":"Paper Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePaperFieldsSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Get Pdf","description":"Get a document by ID","operationId":"get_pdf_api_paper_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Pdf","description":"Delete a document by ID","operationId":"delete_pdf_api_paper_delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/paper/relevant":{"get":{"summary":"Get Relevant Papers","description":"Get the most relevant papers uploaded by the user","operationId":"get_relevant_papers_api_paper_relevant_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/paper/conversation":{"get":{"summary":"Get Mru Paper Conversation","description":"Get latest conversation associated with specific document","operationId":"get_mru_paper_conversation_api_paper_conversation_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"paper_id","in":"query","required":true,"schema":{"type":"string","title":"Paper Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/paper/share":{"post":{"summary":"Share Pdf","description":"Share a document by ID","operationId":"share_pdf_api_paper_share_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Get Shared Pdf","description":"Get a shared document by ID","operationId":"get_shared_pdf_api_paper_share_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/paper/unshare":{"post":{"summary":"Unshare Pdf","description":"Unshare a document by ID","operationId":"unshare_pdf_api_paper_unshare_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/paper/fork":{"post":{"summary":"Fork Shared Paper","description":"Fork a shared paper into the current user's library.\nThe paper must be publicly shared (via share_id).","operationId":"fork_shared_paper_api_paper_fork_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForkSharedPaperRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/conversation/{conversation_id}/rename":{"post":{"summary":"Rename Conversation","description":"Rename a conversation based on its chat history","operationId":"rename_conversation_api_conversation__conversation_id__rename_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversation/everything":{"get":{"summary":"Get Everything Conversations","description":"Get all conversations with conversable_type EVERYTHING","operationId":"get_everything_conversations_api_conversation_everything_get","security":[{"APIKeyHeader":[]}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Create Everything Conversation","description":"Create a new conversation for everything","operationId":"create_everything_conversation_api_conversation_everything_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"title","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversation/share/{share_paper_id}":{"get":{"summary":"Get Shared Paper Conversation","description":"Get conversation for a shared paper","operationId":"get_shared_paper_conversation_api_conversation_share__share_paper_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"share_paper_id","in":"path","required":true,"schema":{"type":"string","title":"Share Paper Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversation/{conversation_id}":{"get":{"summary":"Get Conversation","description":"Get a specific conversation by ID","operationId":"get_conversation_api_conversation__conversation_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Update Conversation","description":"Update conversation title","operationId":"update_conversation_api_conversation__conversation_id__patch","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"title","in":"query","required":true,"schema":{"type":"string","title":"Title"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Conversation","description":"Delete an existing conversation","operationId":"delete_conversation_api_conversation__conversation_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversation/paper/{paper_id}":{"post":{"summary":"Create Conversation","description":"Create a new conversation for a document","operationId":"create_conversation_api_conversation_paper__paper_id__post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"paper_id","in":"path","required":true,"schema":{"type":"string","title":"Paper Id"}},{"name":"title","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/message/models":{"get":{"summary":"Get Available Models","operationId":"get_available_models_api_message_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Available Models Api Message Models Get"}}}}}}},"/api/message/chat/everything":{"post":{"summary":"Chat Message Multipaper","description":"Send a chat message and stream the response from the LLM.\n\nThis searches over the entire corpus of papers and returns a response based on the user's query.\nThe response includes both the content and any relevant evidence gathered.","operationId":"chat_message_multipaper_api_message_chat_everything_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultiPaperChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/message/chat/paper":{"post":{"summary":"Chat Message Stream","description":"Send a chat message and stream the response from the LLM\n\nThe response style can be:\n- normal: Standard balanced response\n- concise: Short and to the point\n- detailed: Comprehensive and thorough","operationId":"chat_message_stream_api_message_chat_paper_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessageRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/highlight":{"post":{"summary":"Create Highlight","description":"Create a new highlight for a document","operationId":"create_highlight_api_highlight_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateHighlightRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/highlight/{paper_id}":{"get":{"summary":"Get Document Highlights","description":"Get all highlights for a specific document","operationId":"get_document_highlights_api_highlight__paper_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"paper_id","in":"path","required":true,"schema":{"type":"string","title":"Paper Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/highlight/{highlight_id}":{"delete":{"summary":"Delete Highlight","description":"Delete a specific highlight","operationId":"delete_highlight_api_highlight__highlight_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"highlight_id","in":"path","required":true,"schema":{"type":"string","title":"Highlight Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Update Highlight","description":"Update an existing highlight","operationId":"update_highlight_api_highlight__highlight_id__patch","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"highlight_id","in":"path","required":true,"schema":{"type":"string","title":"Highlight Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateHighlightRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/annotation":{"post":{"summary":"Create Annotation","description":"Create a new annotation for a highlight","operationId":"create_annotation_api_annotation_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAnnotationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/annotation/{paper_id}":{"get":{"summary":"Get Document Annotations","description":"Get all annotations for a specific document","operationId":"get_document_annotations_api_annotation__paper_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"paper_id","in":"path","required":true,"schema":{"type":"string","title":"Paper Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/annotation/{annotation_id}":{"delete":{"summary":"Delete Annotation","description":"Delete a specific annotation","operationId":"delete_annotation_api_annotation__annotation_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"annotation_id","in":"path","required":true,"schema":{"type":"string","title":"Annotation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Update Annotation","description":"Update an existing annotation","operationId":"update_annotation_api_annotation__annotation_id__patch","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"annotation_id","in":"path","required":true,"schema":{"type":"string","title":"Annotation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAnnotationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects":{"post":{"summary":"Create Project","description":"Create a new project","operationId":"create_project_api_projects_post","security":[{"APIKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Get Projects","description":"Get all projects for the current user","operationId":"get_projects_api_projects_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"detailed","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Detailed"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{project_id}":{"get":{"summary":"Get Project","description":"Get a single project by ID","operationId":"get_project_api_projects__project_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Update Project","description":"Update an existing project","operationId":"update_project_api_projects__project_id__patch","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Project","description":"Delete a specific project","operationId":"delete_project_api_projects__project_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{project_id}/collaborators/change":{"post":{"summary":"Change Project Collaborator Role","description":"Change a collaborator's role in a specific project","operationId":"change_project_collaborator_role_api_projects__project_id__collaborators_change_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{project_id}/collaborators":{"get":{"summary":"Get Project Collaborators","description":"Get all collaborators for a specific project","operationId":"get_project_collaborators_api_projects__project_id__collaborators_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{project_id}/collaborators/self":{"delete":{"summary":"Remove Self From Project","description":"Remove self as a collaborator from a specific project","operationId":"remove_self_from_project_api_projects__project_id__collaborators_self_delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{project_id}/collaborators/{role_id}":{"delete":{"summary":"Remove Project Collaborator","description":"Remove a collaborator from a specific project","operationId":"remove_project_collaborator_api_projects__project_id__collaborators__role_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"role_id","in":"path","required":true,"schema":{"type":"string","title":"Role Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/papers/fork":{"post":{"summary":"Fork Paper From Project","description":"As we can have multiple users working on the same project, sometimes there may be papers in a project a different user wants to fork into their own library. This endpoint allows a user to fork a paper from a specified project into their own library.","operationId":"fork_paper_from_project_api_projects_papers_fork_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForkPaperFromProjectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/projects/papers/forked/{parent_paper_id}":{"get":{"summary":"Get Forked Paper","description":"Get the paper forked from a specific parent paper","operationId":"get_forked_paper_api_projects_papers_forked__parent_paper_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"parent_paper_id","in":"path","required":true,"schema":{"type":"string","title":"Parent Paper Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/papers/{project_id}":{"post":{"summary":"Add Paper To Project","description":"Add a paper to a project","operationId":"add_paper_to_project_api_projects_papers__project_id__post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddPaperToProjectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Get Project Papers","description":"Get all papers for a specific project.\n\nPresigned file URLs are only generated when ``load_urls=true``. Most\ncallers (e.g. the project overview page) just need paper metadata, and\ngenerating URLs for every paper is expensive on cache expiry. Callers\nthat need a URL for a single paper should use the\n``/{project_id}/{paper_id}/file-url`` endpoint instead.","operationId":"get_project_papers_api_projects_papers__project_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"load_urls","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Load Urls"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/papers/{project_id}/pending-jobs":{"get":{"summary":"Get Project Pending Jobs","description":"Get upload jobs still in progress for a project.\n\nLets the client rehydrate the upload tracker after a refresh, since the\nin-flight jobs are otherwise only held in browser state.","operationId":"get_project_pending_jobs_api_projects_papers__project_id__pending_jobs_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/papers/{project_id}/{paper_id}/file-url":{"get":{"summary":"Get Project Paper File Url","description":"Get a presigned file URL for a single paper within a project.\n\nAccess is granted via project membership rather than paper ownership, so\ncollaborators can open papers they don't own. This is the cheap path for\n\"my URL expired, give me a fresh one\" — callers should use this instead\nof refetching the whole project paper list.","operationId":"get_project_paper_file_url_api_projects_papers__project_id___paper_id__file_url_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"paper_id","in":"path","required":true,"schema":{"type":"string","title":"Paper Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/papers/from/{paper_id}":{"get":{"summary":"Get Projects From Paper Id","description":"Get all projects associated with a specific paper","operationId":"get_projects_from_paper_id_api_projects_papers_from__paper_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"paper_id","in":"path","required":true,"schema":{"type":"string","title":"Paper Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/papers/{project_id}/{project_paper_id}":{"delete":{"summary":"Remove Paper From Project","description":"Remove a paper from a project","operationId":"remove_paper_from_project_api_projects_papers__project_id___project_paper_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"project_paper_id","in":"path","required":true,"schema":{"type":"string","title":"Project Paper Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/conversations/{project_id}":{"post":{"summary":"Create Project Conversation","description":"Create a new conversation for a project","operationId":"create_project_conversation_api_projects_conversations__project_id__post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectConversationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Get Project Conversations","description":"Get all conversations for a specific project","operationId":"get_project_conversations_api_projects_conversations__project_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/conversations/{project_id}/{conversation_id}":{"get":{"summary":"Get Project Conversation","description":"Get a specific conversation by ID within a project","operationId":"get_project_conversation_api_projects_conversations__project_id___conversation_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/invitations/user":{"get":{"summary":"Get User Invitations","description":"Get all invitations for the current user","operationId":"get_user_invitations_api_projects_invitations_user_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/projects/invitations/{project_id}":{"get":{"summary":"Get Project Invitations","description":"Get all invitations for a project","operationId":"get_project_invitations_api_projects_invitations__project_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/invitations/{project_id}/invite":{"post":{"summary":"Invite User To Project","description":"Invite multiple users to a project with their respective roles","operationId":"invite_user_to_project_api_projects_invitations__project_id__invite_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkInviteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/invitations/modify/{invitation_id}/accept":{"post":{"summary":"Accept Invitation","description":"Accept a project invitation","operationId":"accept_invitation_api_projects_invitations_modify__invitation_id__accept_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","title":"Invitation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/invitations/modify/{invitation_id}/reject":{"post":{"summary":"Reject Invitation","description":"Reject a project invitation","operationId":"reject_invitation_api_projects_invitations_modify__invitation_id__reject_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","title":"Invitation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/invitations/modify/{invitation_id}/retract":{"delete":{"summary":"Retract Invitation","description":"Retract a project invitation","operationId":"retract_invitation_api_projects_invitations_modify__invitation_id__retract_delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","title":"Invitation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/search/global/search":{"post":{"summary":"Search Papers","description":"Search for papers based on the provided query.","operationId":"search_papers_api_search_global_search_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","title":"Query"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/PaperSort"},{"type":"null"}],"title":"Sort"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OpenAlexFilter"},{"type":"null"}],"title":"Filter"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/search/global/match":{"post":{"summary":"Get Paper Graph","description":"Get the citation graph for a paper.\n\nEither doi or paper_id must be provided. If paper_id is provided,\nthe paper's DOI will be used to look up the OpenAlex ID.","operationId":"get_paper_graph_api_search_global_match_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"doi","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Doi"}},{"name":"paper_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paper Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/search/global/author":{"get":{"summary":"Get Author Works","description":"Get works by a specific author from OpenAlex.\n\nArgs:\n    author_id: The OpenAlex author ID (e.g., \"A5023888391\" or full URL).\n    page: Page number for pagination.","operationId":"get_author_works_api_search_global_author_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"author_id","in":"query","required":true,"schema":{"type":"string","title":"Author Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/search/local/":{"get":{"summary":"Search Knowledge Base Endpoint","description":"Search across papers, annotations, and highlights in the user's knowledge base.\n\nReturns a hierarchical view with matching content organized under paper metadata.\nThe search looks through:\n- Paper titles, abstracts, and raw content\n- Highlight text\n- Annotation content\n\nResults are organized by paper, with matching highlights and annotations\nsub-referenced under each paper's metadata.","operationId":"search_knowledge_base_endpoint_api_search_local__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","description":"Search query string","title":"Q"},"description":"Search query string"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of papers to return","default":50,"title":"Limit"},"description":"Maximum number of papers to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of papers to skip for pagination","default":0,"title":"Offset"},"description":"Number of papers to skip for pagination"},{"name":"papers_filter","in":"query","required":false,"schema":{"type":"string","description":"Comma-separated list of paper IDs to filter results by specific papers","title":"Papers Filter"},"description":"Comma-separated list of paper IDs to filter results by specific papers"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/search/local/stats":{"get":{"summary":"Get Search Stats","description":"Get statistics about the user's knowledge base for search context.\n\nReturns counts of papers, highlights, and annotations.","operationId":"get_search_stats_api_search_local_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/paper/audio/":{"post":{"summary":"Create Audio Overview","description":"Create audio overview by ID","operationId":"create_audio_overview_api_paper_audio__post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioOverviewCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/paper/audio/{id}/status":{"get":{"summary":"Get Audio Overview Job Status","description":"Get the status of the audio overview job by ID","operationId":"get_audio_overview_job_status_api_paper_audio__id__status_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/paper/audio/all/{id}":{"get":{"summary":"Get Audio Overviews By Paper Id","description":"Get all audio overviews for a specific paper by ID","operationId":"get_audio_overviews_by_paper_id_api_paper_audio_all__id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/paper/audio/file/{audio_overview_id}":{"get":{"summary":"Get Audio Overview By Id","description":"Get a specific audio overview by ID","operationId":"get_audio_overview_by_id_api_paper_audio_file__audio_overview_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"audio_overview_id","in":"path","required":true,"schema":{"type":"string","title":"Audio Overview Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/paper/audio/{id}/file":{"get":{"summary":"Get Mrc Audio Overview File","description":"Get the audio overview file by ID","operationId":"get_mrc_audio_overview_file_api_paper_audio__id__file_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/paper/image/paper/{paper_id}":{"get":{"summary":"Get Paper Images With Presigned Urls","description":"Get all images for a specific paper with presigned URLs for direct access","operationId":"get_paper_images_with_presigned_urls_api_paper_image_paper__paper_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"paper_id","in":"path","required":true,"schema":{"type":"string","title":"Paper Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/paper/image/{image_id}":{"get":{"summary":"Get Paper Image By Id","description":"Get a specific paper image by ID","operationId":"get_paper_image_by_id_api_paper_image__image_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"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/paper/image/{image_id}/with_url":{"get":{"summary":"Get Paper Image With Presigned Url","description":"Get a specific paper image by ID with presigned URL for direct access","operationId":"get_paper_image_with_presigned_url_api_paper_image__image_id__with_url_get","security":[{"APIKeyHeader":[]}],"parameters":[{"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/projects/tables/propose":{"post":{"summary":"Propose Data Table Schema","description":"Propose data table columns from a natural language description of what\nthe user wants to extract from the project's papers. An agent investigates\nthe papers (search/read tools) so every proposed column is grounded in\nwhat they actually report.\n\nDeliberately sync (no `async`): the body runs a multi-turn LLM tool loop —\nas `async def` it would block the event loop for its whole duration.","operationId":"propose_data_table_schema_api_projects_tables_propose_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposeDataTableSchemaRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/projects/tables":{"post":{"summary":"Create Data Table","description":"Create a data table extraction job for a project.","operationId":"create_data_table_api_projects_tables_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDataTableRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/projects/tables/jobs/{project_id}":{"get":{"summary":"List Data Table Jobs","description":"List all pending data table extraction jobs for a given project.","operationId":"list_data_table_jobs_api_projects_tables_jobs__project_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"all","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"All"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/tables/{job_id}":{"get":{"summary":"Get Data Table Job Status","description":"Get the status of a data table extraction job, including real-time Celery task status.","operationId":"get_data_table_job_status_api_projects_tables__job_id__get","security":[{"APIKeyHeader":[]}],"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"}}}}}}},"/api/projects/tables/results/{result_id}":{"get":{"summary":"Get Data Table Job Results","description":"Get the results of a completed data table extraction job.","operationId":"get_data_table_job_results_api_projects_tables_results__result_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"result_id","in":"path","required":true,"schema":{"type":"string","title":"Result Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/paper/upload/status/{job_id}":{"get":{"summary":"Get Upload Status","description":"Get the status of a paper upload job, including real-time Celery task status.","operationId":"get_upload_status_api_paper_upload_status__job_id__get","security":[{"APIKeyHeader":[]}],"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"}}}}}}},"/api/paper/upload/from-url/":{"post":{"summary":"Upload Pdf From Url","description":"Upload a document from a given URL, rather than the raw file.","operationId":"upload_pdf_from_url_api_paper_upload_from_url__post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadFromUrlSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/paper/upload/":{"post":{"summary":"Upload Pdf","description":"Upload a PDF file","operationId":"upload_pdf_api_paper_upload__post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_pdf_api_paper_upload__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/audio/{project_id}":{"post":{"summary":"Create Project Audio Overview","description":"Create audio overview for a project by ID","operationId":"create_project_audio_overview_api_projects_audio__project_id__post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioOverviewCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/audio/{id}":{"get":{"summary":"Get Project Audio Overviews","description":"Get all audio overviews for a specific project by ID","operationId":"get_project_audio_overviews_api_projects_audio__id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/audio/jobs/{project_id}":{"get":{"summary":"Get Audio Overview Jobs By Project Id","description":"Get all audio overview jobs for a specific project by ID","operationId":"get_audio_overview_jobs_by_project_id_api_projects_audio_jobs__project_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"all","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"All"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/audio/file/{project_id}/{audio_overview_id}":{"get":{"summary":"Get Audio Overview By Id","description":"Get a specific audio overview by ID","operationId":"get_audio_overview_by_id_api_projects_audio_file__project_id___audio_overview_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"audio_overview_id","in":"path","required":true,"schema":{"type":"string","title":"Audio Overview Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/artifacts/{project_id}/{artifact_id}":{"get":{"summary":"Get Project Chart Artifact","description":"Return one chart artifact for the project's full-detail view.","operationId":"get_project_chart_artifact_api_projects_artifacts__project_id___artifact_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/artifacts/{project_id}":{"get":{"summary":"Get Project Artifacts","description":"Get chat-generated artifacts for a project.\n\nProject conversations are visible to every member, so their artifacts are\ntoo: any role in the project (admin/editor/viewer) grants read access.","operationId":"get_project_artifacts_api_projects_artifacts__project_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/charts/propose":{"post":{"summary":"Propose Chart","operationId":"propose_chart_api_projects_charts_propose_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposeChartRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/projects/charts":{"post":{"summary":"Create Chart","operationId":"create_chart_api_projects_charts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChartRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/projects/charts/jobs/{project_id}":{"get":{"summary":"List Chart Jobs","operationId":"list_chart_jobs_api_projects_charts_jobs__project_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/paper/tag/":{"get":{"summary":"Get All Tags","description":"Get all tags for the current user.","operationId":"get_all_tags_api_paper_tag__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]},"post":{"summary":"Create Tag","description":"Create a new tag for the current user.","operationId":"create_tag_api_paper_tag__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaperTagCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/paper/tag/bulk":{"post":{"summary":"Bulk Add Tags","description":"Apply multiple tags to multiple papers.","operationId":"bulk_add_tags_api_paper_tag_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkTagRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/paper/tag/papers/{paper_id}/tags/{tag_id}":{"delete":{"summary":"Remove Tag From Paper","description":"Remove a tag from a specific paper.","operationId":"remove_tag_from_paper_api_paper_tag_papers__paper_id__tags__tag_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"paper_id","in":"path","required":true,"schema":{"type":"string","title":"Paper Id"}},{"name":"tag_id","in":"path","required":true,"schema":{"type":"string","title":"Tag Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/paper/tag/papers/{paper_id}/tags":{"get":{"summary":"Get Tags For Paper","description":"Get all tags for a specific paper.","operationId":"get_tags_for_paper_api_paper_tag_papers__paper_id__tags_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"paper_id","in":"path","required":true,"schema":{"type":"string","title":"Paper Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/paper/tag/tags/{tag_id}/papers":{"get":{"summary":"Get Papers For Tag","description":"Get all papers associated with a specific tag.","operationId":"get_papers_for_tag_api_paper_tag_tags__tag_id__papers_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"tag_id","in":"path","required":true,"schema":{"type":"string","title":"Tag Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/subscription/create-checkout-session":{"post":{"summary":"Create Checkout Session","operationId":"create_checkout_session_api_subscription_create_checkout_session_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"interval","in":"query","required":true,"schema":{"$ref":"#/components/schemas/SubscriptionInterval"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/subscription/session-status":{"get":{"summary":"Session Status","operationId":"session_status_api_subscription_session_status_get","parameters":[{"name":"session_id","in":"query","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/subscription/user-subscription":{"get":{"summary":"Get User Subscription","description":"Get the current user's subscription status","operationId":"get_user_subscription_api_subscription_user_subscription_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/subscription/usage":{"get":{"summary":"Get User Usage","description":"Get the current user's subscription usage and limits","operationId":"get_user_usage_api_subscription_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/subscription/create-portal-session":{"post":{"summary":"Create Customer Portal Session","description":"Create a Stripe customer portal session for the current user","operationId":"create_customer_portal_session_api_subscription_create_portal_session_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/subscription/resubscribe":{"post":{"summary":"Resubscribe","description":"Reactivate a canceled subscription or reverse a scheduled cancellation.\n\nThis endpoint handles two scenarios:\n1. If subscription is scheduled for cancellation (cancel_at_period_end=true),\n   it will reverse the cancellation by setting cancel_at_period_end=false\n2. If subscription is already canceled, it will create a new subscription\n   using the existing customer and payment method","operationId":"resubscribe_api_subscription_resubscribe_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/subscription/change-interval":{"post":{"summary":"Change Subscription Interval","description":"Schedule a billing interval change at the end of the current billing period\nusing Stripe Subscription Schedules. No immediate charge or proration.","operationId":"change_subscription_interval_api_subscription_change_interval_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"new_interval","in":"query","required":true,"schema":{"$ref":"#/components/schemas/SubscriptionInterval"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/subscription/cancel-scheduled-change":{"post":{"summary":"Cancel Scheduled Change","description":"Cancel a previously scheduled billing interval change.\nReleases the Stripe Subscription Schedule so the subscription continues as-is.","operationId":"cancel_scheduled_change_api_subscription_cancel_scheduled_change_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/subscription/stripe":{"post":{"summary":"Handle Stripe Webhook","description":"Handle Stripe webhook events for subscription management","operationId":"handle_stripe_webhook_api_subscription_stripe_post","parameters":[{"name":"stripe-signature","in":"header","required":false,"schema":{"type":"string","title":"Stripe-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/webhooks/paper-processing/{job_id}":{"post":{"summary":"Handle Paper Processing Webhook","description":"Handle webhook from paper processing jobs service.","operationId":"handle_paper_processing_webhook_api_webhooks_paper_processing__job_id__post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdfProcessingWebhookData"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/webhooks/data-table-processing/{job_id}":{"post":{"summary":"Handle Data Table Processing Webhook","description":"Handle webhook from data table processing jobs service.\n\nDeliberately sync (no `async`): the body is synchronous end-to-end and\nincludes a blocking LLM call (`name_data_table`). As `async def` it ran on\nthe event loop and froze the whole server for the duration of that call —\nFastAPI runs sync handlers in the threadpool instead.","operationId":"handle_data_table_processing_webhook_api_webhooks_data_table_processing__job_id__post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataTableProcessingResultWebhookData"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/webhooks/internal/referral-settle/{referral_id}":{"post":{"summary":"Settle Referral","description":"Internal callback fired by the jobs service when a referral credit hold\nhas elapsed. Idempotent — re-runs on the same referral are no-ops.\n\nAuth: the referral_id is an unguessable UUID. This matches the pattern of\n/api/webhooks/paper-processing/{job_id}.","operationId":"settle_referral_api_webhooks_internal_referral_settle__referral_id__post","parameters":[{"name":"referral_id","in":"path","required":true,"schema":{"type":"string","title":"Referral Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/webhooks/internal/zotero-sync-all":{"post":{"summary":"Trigger Zotero Sync All","description":"Internal endpoint called by the Celery Beat periodic task to sync new Zotero\nannotations for all users whose items haven't been synced in the past 24 hours.\nAuth: shared secret via Authorization header (JOBS_INTERNAL_SECRET env var).\n\nDispatch-and-return: syncing every due user can take minutes — far past the\nload balancer's timeout — so the response only reports how many users were\ndispatched. The per-user work runs as a background task, and its outcomes\n(per-user errors, final summary) are logged here on the server.","operationId":"trigger_zotero_sync_all_api_webhooks_internal_zotero_sync_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/onboarding":{"post":{"summary":"Create Onboarding","description":"Create or update onboarding data for a user","operationId":"create_onboarding_api_onboarding_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOnboardingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/discover/search":{"post":{"summary":"Discover Search","description":"Search for research papers by decomposing a question into subqueries.","operationId":"discover_search_api_discover_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoverSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/discover/history":{"get":{"summary":"Discover History","description":"Get the user's past discover searches.","operationId":"discover_history_api_discover_history_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/discover/sources":{"get":{"summary":"Discover Sources","description":"Get the list of available source filters for discover search.","operationId":"discover_sources_api_discover_sources_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/discover/{search_id}":{"get":{"summary":"Discover Get","description":"Get a single discover search by ID.","operationId":"discover_get_api_discover__search_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"search_id","in":"path","required":true,"schema":{"type":"string","title":"Search Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/referral/me":{"get":{"summary":"Get My Referral Info","operationId":"get_my_referral_info_api_referral_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/referral/attribute":{"post":{"summary":"Attribute","operationId":"attribute_api_referral_attribute_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/referral/balance":{"get":{"summary":"Get Balance","description":"Read-only referral standing for the current user.\n\nUsed by surfaces that want to show \"you have $X waiting\" or \"50% off\nwaiting\" without lazy-creating a referral code for users who haven't\nengaged with the share flow.","operationId":"get_balance_api_referral_balance_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/referral/toast-status":{"get":{"summary":"Get Toast Status","description":"Lightweight check for whether the milestone toast should be considered.\n\nDistinct from /me — does not lazy-create a referral code, so calling it on\nevery authenticated page load is cheap and doesn't clutter the DB.","operationId":"get_toast_status_api_referral_toast_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/referral/toast-seen":{"post":{"summary":"Mark Toast Seen","description":"Idempotent: stamp the user as having seen the referral milestone toast.","operationId":"mark_toast_seen_api_referral_toast_seen_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/zotero/library":{"get":{"summary":"Zotero Library","description":"List importable journal articles, conference papers, and preprints from the user's Zotero library.","operationId":"zotero_library_api_zotero_library_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZoteroLibraryResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/zotero/import":{"post":{"summary":"Zotero Import","description":"Import selected journal articles, conference papers, and preprints from Zotero (PDF or URL fallback).","operationId":"zotero_import_api_zotero_import_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZoteroImportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZoteroImportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/zotero/sync":{"post":{"summary":"Zotero Sync","description":"Manually trigger annotation sync for all already-imported Zotero PDF papers. Available to all plan tiers.","operationId":"zotero_sync_api_zotero_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZoteroSyncResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/zotero/import/status":{"get":{"summary":"Zotero Import Status List","description":"List recent Zotero import records for the current user.","operationId":"zotero_import_status_list_api_zotero_import_status_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"item_keys","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Item Keys"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZoteroImportStatusListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AIHighlight":{"properties":{"text":{"type":"string","title":"Text","description":"The raw text of the highlight as it appears in the paper. Ensure that this is a direct quote or paraphrase from the paper."},"annotation":{"type":"string","title":"Annotation","description":"The context or annotation for the highlight, explaining its significance or relevance to the paper's content. Less than 350 characters."},"type":{"$ref":"#/components/schemas/HighlightType","description":"The type of highlight. This can be one of the following: topic, motivation, method, evidence, result, impact. This helps categorize the highlight based on its content and significance."}},"type":"object","required":["text","annotation","type"],"title":"AIHighlight","description":"Schema for a highlight in the paper.\nThis is used to represent a single highlight with its text and context."},"AddPaperToProjectRequest":{"properties":{"paper_ids":{"items":{"type":"string"},"type":"array","title":"Paper Ids"}},"type":"object","required":["paper_ids"],"title":"AddPaperToProjectRequest"},"AttributeRequest":{"properties":{"code":{"type":"string","title":"Code"},"via_link":{"type":"boolean","title":"Via Link","default":true}},"type":"object","required":["code"],"title":"AttributeRequest"},"AudioOverviewCreateRequest":{"properties":{"additional_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additional Instructions"},"length":{"anyOf":[{"type":"string","enum":["short","medium","long"]},{"type":"null"}],"title":"Length","default":"medium"},"voice":{"anyOf":[{"type":"string","enum":["alloy","ash","ballad","coral","echo","fable","onyx","nova","sage","shimmer","verse"]},{"type":"null"}],"title":"Voice"}},"type":"object","title":"AudioOverviewCreateRequest"},"AuthResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"user":{"anyOf":[{"$ref":"#/components/schemas/CurrentUser"},{"type":"null"}]},"newly_created":{"type":"boolean","title":"Newly Created","default":false},"needs_name":{"type":"boolean","title":"Needs Name","default":false}},"type":"object","required":["success","message"],"title":"AuthResponse","description":"Response model for auth routes."},"BlockUserRequest":{"properties":{"user_id":{"type":"string","title":"User Id"},"blocked":{"type":"boolean","title":"Blocked"}},"type":"object","required":["user_id","blocked"],"title":"BlockUserRequest","description":"Request model for blocking/unblocking a user."},"Body_upload_pdf_api_paper_upload__post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_pdf_api_paper_upload__post"},"BulkInviteRequest":{"properties":{"invites":{"items":{"$ref":"#/components/schemas/InviteUser"},"type":"array","title":"Invites"}},"type":"object","required":["invites"],"title":"BulkInviteRequest"},"BulkTagRequest":{"properties":{"paper_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Paper Ids"},"tag_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Tag Ids"}},"type":"object","required":["paper_ids","tag_ids"],"title":"BulkTagRequest"},"CellEntry":{"properties":{"value":{"type":"string","title":"Value"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"citations":{"items":{"$ref":"#/components/schemas/ResponseCitation"},"type":"array","title":"Citations","default":[]}},"type":"object","required":["value"],"title":"CellEntry","description":"One element of a list-valued cell, individually cited."},"ChangeRoleRequest":{"properties":{"role_id":{"type":"string","title":"Role Id"},"new_role":{"$ref":"#/components/schemas/ProjectRoles"}},"type":"object","required":["role_id","new_role"],"title":"ChangeRoleRequest"},"ChartCalculation":{"properties":{"label":{"type":"string","title":"Label"},"spec":{"type":"string","title":"Spec"},"inputs":{"items":{"type":"string"},"type":"array","title":"Inputs"}},"type":"object","required":["label","spec"],"title":"ChartCalculation","description":"A derived y value computed only from cited primitive fields."},"ChartField":{"properties":{"key":{"type":"string","title":"Key","description":"Stable short key used in chart records"},"label":{"type":"string","title":"Label","description":"Human-readable axis or grouping label"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit","description":"The unit this field's numbers are plotted in — s, %, mg/dL, kg. One field is one unit, so name it here even when the papers are expected to disagree: each paper's number is converted into this one. Leave empty only for a measure that has no unit at all — a count, an index, a dimensionless score."}},"type":"object","required":["key","label"],"title":"ChartField","description":"One field the chart extractor must find in a paper."},"ChartPlan":{"properties":{"title":{"type":"string","title":"Title"},"chart_type":{"type":"string","enum":["bar","line","scatter"],"title":"Chart Type"},"x":{"$ref":"#/components/schemas/ChartField"},"y":{"$ref":"#/components/schemas/ChartField"},"series":{"anyOf":[{"$ref":"#/components/schemas/ChartField"},{"type":"null"}]},"fields":{"items":{"$ref":"#/components/schemas/ChartField"},"type":"array","title":"Fields","description":"Primitive fields extracted for the chart, including x/y when raw"},"calculation":{"anyOf":[{"$ref":"#/components/schemas/ChartCalculation"},{"type":"null"}]}},"type":"object","required":["title","chart_type","x","y"],"title":"ChartPlan"},"ChatMessageRequest":{"properties":{"paper_id":{"type":"string","title":"Paper Id"},"conversation_id":{"type":"string","title":"Conversation Id"},"user_query":{"type":"string","title":"User Query"},"user_references":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"User References"},"style":{"anyOf":[{"$ref":"#/components/schemas/ResponseStyle"},{"type":"null"}],"default":"normal"},"llm_provider":{"anyOf":[{"$ref":"#/components/schemas/LLMProvider"},{"type":"null"}]}},"type":"object","required":["paper_id","conversation_id","user_query"],"title":"ChatMessageRequest"},"ComputedColumnSpec":{"properties":{"label":{"type":"string","title":"Label","description":"Display label of the computed column"},"spec":{"type":"string","title":"Spec","description":"Natural-language description of the computation, e.g. 'the average of the per-model scores, then averaged across models'"},"inputs":{"items":{"type":"string"},"type":"array","title":"Inputs","description":"Labels of the extracted columns the computation reads"}},"type":"object","required":["label","spec","inputs"],"title":"ComputedColumnSpec","description":"A column computed by the sandboxed compute agent from other (extracted)\ncolumns, never by the extraction model.\n\n`spec` is a natural-language description of the computation; the agent\nturns it into a script. `inputs` names the columns the script may read —\nthe script receives only those, which is what keeps the provenance of a\ncomputed value inspectable."},"CreateAnnotationRequest":{"properties":{"paper_id":{"type":"string","title":"Paper Id"},"highlight_id":{"type":"string","title":"Highlight Id"},"content":{"type":"string","title":"Content"}},"type":"object","required":["paper_id","highlight_id","content"],"title":"CreateAnnotationRequest"},"CreateChartRequest":{"properties":{"project_id":{"type":"string","title":"Project Id"},"prompt":{"type":"string","title":"Prompt"},"paper_ids":{"items":{"type":"string"},"type":"array","title":"Paper Ids"},"plan":{"$ref":"#/components/schemas/ChartPlan"}},"type":"object","required":["project_id","prompt","plan"],"title":"CreateChartRequest"},"CreateDataTableRequest":{"properties":{"project_id":{"type":"string","title":"Project Id"},"columns":{"items":{"type":"string"},"type":"array","title":"Columns"},"computed_columns":{"items":{"$ref":"#/components/schemas/ComputedColumnSpec"},"type":"array","title":"Computed Columns","default":[]},"list_columns":{"items":{"type":"string"},"type":"array","title":"List Columns","default":[]}},"type":"object","required":["project_id","columns"],"title":"CreateDataTableRequest"},"CreateHighlightRequest":{"properties":{"paper_id":{"type":"string","title":"Paper Id"},"raw_text":{"type":"string","title":"Raw Text"},"position":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Position"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"start_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start Offset"},"end_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"End Offset"},"page_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Number"}},"type":"object","required":["paper_id","raw_text"],"title":"CreateHighlightRequest"},"CreateOnboardingRequest":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"research_fields":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Research Fields"},"research_fields_other":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Research Fields Other"},"job_titles":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Titles"},"job_titles_other":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Titles Other"},"reading_frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reading Frequency"},"referral_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referral Source"},"referral_source_other":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referral Source Other"}},"type":"object","required":["name","email"],"title":"CreateOnboardingRequest"},"CreatePaperNoteSchema":{"properties":{"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"}},"type":"object","required":["content"],"title":"CreatePaperNoteSchema"},"CreateProjectConversationRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"}},"type":"object","title":"CreateProjectConversationRequest"},"CreateProjectRequest":{"properties":{"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["title"],"title":"CreateProjectRequest"},"CurrentUser":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","format":"email","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"is_admin":{"type":"boolean","title":"Is Admin","default":false},"picture":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Picture"},"is_email_verified":{"type":"boolean","title":"Is Email Verified","default":false},"is_active":{"type":"boolean","title":"Is Active","default":false},"is_blocked":{"type":"boolean","title":"Is Blocked","default":false}},"type":"object","required":["id","email"],"title":"CurrentUser"},"DataTableCellValue":{"properties":{"value":{"type":"string","title":"Value","description":"The extracted value for this column"},"citations":{"items":{"$ref":"#/components/schemas/ResponseCitation"},"type":"array","title":"Citations","description":"List of citations that support this specific value. These should be direct quotes or paraphrases from the paper.","default":[]},"entries":{"anyOf":[{"items":{"$ref":"#/components/schemas/CellEntry"},"type":"array"},{"type":"null"}],"title":"Entries","description":"Present only on list-valued cells: the individual elements, each with its own citations. `value` holds their joined display form."}},"type":"object","required":["value"],"title":"DataTableCellValue","description":"Value for a single cell in the data table with supporting citations."},"DataTableProcessingResultWebhookData":{"properties":{"task_id":{"type":"string","title":"Task Id"},"status":{"type":"string","title":"Status"},"result":{"$ref":"#/components/schemas/DataTableResult"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["task_id","status","result"],"title":"DataTableProcessingResultWebhookData","description":"Schema for webhook data from data table processing service."},"DataTableResult":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the extraction was successful"},"columns":{"items":{"type":"string"},"type":"array","title":"Columns","description":"List of column names in the data table."},"rows":{"items":{"$ref":"#/components/schemas/DataTableRow"},"type":"array","title":"Rows","description":"Row data per paper","default":[]},"row_failures":{"items":{"type":"string"},"type":"array","title":"Row Failures","description":"List of paper IDs that failed extraction","default":[]}},"type":"object","required":["success","columns"],"title":"DataTableResult","description":"Result of a data table extraction job."},"DataTableRow":{"properties":{"paper_id":{"type":"string","title":"Paper Id","description":"The ID of the paper this row corresponds to"},"values":{"additionalProperties":{"$ref":"#/components/schemas/DataTableCellValue"},"type":"object","title":"Values","description":"Mapping of column name to cell value with citations"}},"type":"object","required":["paper_id","values"],"title":"DataTableRow","description":"A row in the data table representing extracted values for a single paper."},"DiscoverSearchRequest":{"properties":{"question":{"type":"string","title":"Question"},"sources":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Sources"},"sort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort"},"only_open_access":{"type":"boolean","title":"Only Open Access","default":false},"year_filter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Year Filter"}},"type":"object","required":["question"],"title":"DiscoverSearchRequest"},"EmailSetNameRequest":{"properties":{"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"}},"type":"object","required":["email","name"],"title":"EmailSetNameRequest","description":"Request model for setting name."},"EmailSignInRequest":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"EmailSignInRequest","description":"Request model for email sign-in."},"EmailVerifyRequest":{"properties":{"email":{"type":"string","title":"Email"},"code":{"type":"string","title":"Code"}},"type":"object","required":["email","code"],"title":"EmailVerifyRequest","description":"Request model for email verification."},"ForkPaperFromProjectRequest":{"properties":{"source_project_id":{"type":"string","title":"Source Project Id"},"paper_id":{"type":"string","title":"Paper Id"}},"type":"object","required":["source_project_id","paper_id"],"title":"ForkPaperFromProjectRequest"},"ForkSharedPaperRequest":{"properties":{"share_id":{"type":"string","title":"Share Id"}},"type":"object","required":["share_id"],"title":"ForkSharedPaperRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HighlightType":{"type":"string","enum":["topic","motivation","method","evidence","result","impact","general"],"title":"HighlightType"},"InviteUser":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"role":{"type":"string","title":"Role"}},"type":"object","required":["email","role"],"title":"InviteUser"},"LLMProvider":{"type":"string","enum":["gemini","openai","anthropic"],"title":"LLMProvider"},"MultiPaperChatRequest":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"},"user_query":{"type":"string","title":"User Query"},"user_references":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"User References"},"llm_provider":{"anyOf":[{"$ref":"#/components/schemas/LLMProvider"},{"type":"null"}]},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"mentioned_paper_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Mentioned Paper Ids"},"mentioned_project_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Mentioned Project Ids"},"mentioned_highlight_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Mentioned Highlight Ids"}},"type":"object","required":["conversation_id","user_query"],"title":"MultiPaperChatRequest"},"OpenAlexFilter":{"properties":{"authors":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Authors"},"institutions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Institutions"},"only_oa":{"type":"boolean","title":"Only Oa","default":false},"from_publication_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Publication Date"},"min_cited_by_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Cited By Count"}},"type":"object","title":"OpenAlexFilter"},"PDFProcessingResult":{"properties":{"success":{"type":"boolean","title":"Success"},"job_id":{"type":"string","title":"Job Id"},"raw_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Content"},"page_offset_map":{"anyOf":[{"additionalProperties":{"items":{"type":"integer"},"type":"array"},"type":"object"},{"type":"null"}],"title":"Page Offset Map"},"metadata":{"anyOf":[{"$ref":"#/components/schemas/PaperMetadataExtraction"},{"type":"null"}]},"s3_object_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Object Key"},"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url"},"preview_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Url"},"preview_object_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Object Key"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"duration":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration"}},"type":"object","required":["success","job_id"],"title":"PDFProcessingResult","description":"Result of PDF processing"},"PaperMetadataExtraction":{"properties":{"title":{"type":"string","title":"Title","description":"Title of the paper in normal case"},"authors":{"items":{"type":"string"},"type":"array","title":"Authors","description":"List of authors","default":[]},"abstract":{"type":"string","title":"Abstract","description":"Abstract of the paper","default":""},"institutions":{"items":{"type":"string"},"type":"array","title":"Institutions","description":"List of institutions involved in the publication.","default":[]},"keywords":{"items":{"type":"string"},"type":"array","title":"Keywords","description":"3-8 concise topical keywords in normal case (not Title Case or ALL CAPS); capitalize only proper nouns and acronyms.","default":[]},"summary":{"type":"string","title":"Summary","description":"\nA concise, well-structured summary of the paper in markdown format. Include:\n1. Key findings and contributions\n2. Research methodology\n3. Results and implications\n4. Potential applications or impact\n\nFormat guidelines:\n- Optional opening title (under 10 words)\n- First paragraph: 2-4 sentence overview of the paper\n- Use clear headings, bullet points, and tables for organization\n- Include relevant data points and metrics when available\n- Use plain language while preserving technical accuracy\n- Include inline citations to support claims that refer to the paper's content. This is especially important for claims about the findings, methodology, and results.\n\nCitation guidelines:\n- Use [^1], [^2], [^6, ^7] etc. for citations in the summary\n- Always increase the index of the citation sequentially, starting from 1\n- You will separately provide a list of citations in the `summary_citations` field with the raw text and index\n\nThe summary should be accessible to readers with basic domain knowledge while maintaining scientific integrity.\n                         ","default":""},"summary_citations":{"items":{"$ref":"#/components/schemas/ResponseCitation"},"type":"array","title":"Summary Citations","description":"List of citations that are relevant to the summary. These should be direct quotes or paraphrases from the paper that support the summary provided. Remember to include the citation index (e.g., [^1], [^2]) in the summary.","default":[]},"publish_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publish Date","description":"Publishing date of the paper in YYYY-MM-DD format"},"highlights":{"items":{"$ref":"#/components/schemas/AIHighlight"},"type":"array","title":"Highlights","description":"List of key highlights from the paper. These should be significant quotes that are must-reads of the paper's findings and contributions. Each highlight should include the text of the highlight and an annotation explaining its significance or relevance to the paper's content. Particularly drill into interesting, novel findings, methodologies, or implications that are worth noting. Pay special attention to tables, figures, and diagrams that may contain important information.","default":[]}},"type":"object","required":["title"],"title":"PaperMetadataExtraction"},"PaperSort":{"type":"string","enum":["cited_by_count:desc","publication_date:desc"],"title":"PaperSort"},"PaperStatus":{"type":"string","enum":["todo","reading","completed"],"title":"PaperStatus"},"PaperTagCreate":{"properties":{"name":{"type":"string","title":"Name"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"}},"type":"object","required":["name"],"title":"PaperTagCreate"},"PdfProcessingWebhookData":{"properties":{"task_id":{"type":"string","title":"Task Id"},"status":{"type":"string","title":"Status"},"result":{"anyOf":[{"$ref":"#/components/schemas/PDFProcessingResult"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"user_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Message"}},"type":"object","required":["task_id","status"],"title":"PdfProcessingWebhookData","description":"Schema for webhook data from PDF processing service"},"ProfileUpdateRequest":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"ProfileUpdateRequest","description":"Request model for profile update."},"ProjectRoles":{"type":"string","enum":["admin","editor","viewer"],"title":"ProjectRoles"},"ProposeChartRequest":{"properties":{"project_id":{"type":"string","title":"Project Id"},"prompt":{"type":"string","title":"Prompt"},"paper_ids":{"items":{"type":"string"},"type":"array","title":"Paper Ids"}},"type":"object","required":["project_id","prompt"],"title":"ProposeChartRequest"},"ProposeDataTableSchemaRequest":{"properties":{"project_id":{"type":"string","title":"Project Id"},"prompt":{"type":"string","title":"Prompt"}},"type":"object","required":["project_id","prompt"],"title":"ProposeDataTableSchemaRequest"},"ResponseCitation":{"properties":{"text":{"type":"string","title":"Text","description":"The raw text of the citation as it appears in the paper. Ensure that this is a direct quote or paraphrase from the paper."},"index":{"type":"integer","title":"Index","description":"The index of the citation in the paper's reference list. This is used to identify the citation in discussions or findings."},"paper_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paper Id","description":"The unique identifier of the paper from which this citation is drawn. This helps to contextualize the citation within the broader multi-paper analysis. This is required when there are multiple papers being analyzed."}},"type":"object","required":["text","index"],"title":"ResponseCitation","description":"Schema for a citation in the paper.\nThis is used to represent a single citation with its text and context."},"ResponseStyle":{"type":"string","enum":["normal","concise","detailed"],"title":"ResponseStyle"},"SubscriptionInterval":{"type":"string","enum":["month","year"],"title":"SubscriptionInterval"},"UpdateAnnotationRequest":{"properties":{"content":{"type":"string","title":"Content"}},"type":"object","required":["content"],"title":"UpdateAnnotationRequest"},"UpdateHighlightRequest":{"properties":{"raw_text":{"type":"string","title":"Raw Text"},"position":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Position"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"start_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start Offset"},"end_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"End Offset"}},"type":"object","required":["raw_text"],"title":"UpdateHighlightRequest"},"UpdatePaperFieldsSchema":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"authors":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Authors"},"abstract":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abstract"},"institutions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Institutions"},"publish_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publish Date"},"doi":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Doi"},"journal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Journal"},"publisher":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publisher"}},"type":"object","title":"UpdatePaperFieldsSchema"},"UpdatePaperNoteSchema":{"properties":{"content":{"type":"string","title":"Content"}},"type":"object","required":["content"],"title":"UpdatePaperNoteSchema"},"UpdateProjectRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"UpdateProjectRequest"},"UploadFromUrlSchema":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"}},"type":"object","required":["url"],"title":"UploadFromUrlSchema"},"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"},"ZoteroConnectResponse":{"properties":{"auth_url":{"type":"string","title":"Auth Url"}},"type":"object","required":["auth_url"],"title":"ZoteroConnectResponse"},"ZoteroDisconnectResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"ZoteroDisconnectResponse"},"ZoteroImportError":{"properties":{"zotero_item_key":{"type":"string","title":"Zotero Item Key"},"error":{"type":"string","title":"Error"}},"type":"object","required":["zotero_item_key","error"],"title":"ZoteroImportError"},"ZoteroImportItemResult":{"properties":{"zotero_item_key":{"type":"string","title":"Zotero Item Key"},"paper_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paper Id"},"upload_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upload Job Id"},"import_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Import Source"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"}},"type":"object","required":["zotero_item_key"],"title":"ZoteroImportItemResult"},"ZoteroImportRequest":{"properties":{"item_keys":{"items":{"type":"string"},"type":"array","maxItems":50,"minItems":1,"title":"Item Keys"}},"type":"object","required":["item_keys"],"title":"ZoteroImportRequest"},"ZoteroImportResponse":{"properties":{"imported":{"items":{"$ref":"#/components/schemas/ZoteroImportItemResult"},"type":"array","title":"Imported"},"imported_count":{"type":"integer","title":"Imported Count"},"imported_via_url":{"type":"integer","title":"Imported Via Url"},"skipped_already_imported":{"type":"integer","title":"Skipped Already Imported"},"errors":{"items":{"$ref":"#/components/schemas/ZoteroImportError"},"type":"array","title":"Errors"}},"type":"object","required":["imported","imported_count","imported_via_url","skipped_already_imported","errors"],"title":"ZoteroImportResponse"},"ZoteroImportStatusItem":{"properties":{"zotero_item_key":{"type":"string","title":"Zotero Item Key"},"paper_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paper Id"},"upload_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upload Job Id"},"import_source":{"type":"string","title":"Import Source"},"status":{"type":"string","title":"Status"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Synced At"}},"type":"object","required":["zotero_item_key","import_source","status"],"title":"ZoteroImportStatusItem"},"ZoteroImportStatusListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ZoteroImportStatusItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"ZoteroImportStatusListResponse"},"ZoteroLibraryItem":{"properties":{"zotero_item_key":{"type":"string","title":"Zotero Item Key"},"title":{"type":"string","title":"Title"},"authors":{"items":{"type":"string"},"type":"array","title":"Authors"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"item_type":{"type":"string","title":"Item Type"},"venue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Venue"},"date_added":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date Added"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"collections":{"items":{"type":"string"},"type":"array","title":"Collections","default":[]},"already_imported":{"type":"boolean","title":"Already Imported"},"has_pdf_attachment":{"type":"boolean","title":"Has Pdf Attachment","default":false},"has_metadata":{"type":"boolean","title":"Has Metadata","default":true}},"type":"object","required":["zotero_item_key","title","authors","item_type","already_imported"],"title":"ZoteroLibraryItem"},"ZoteroLibraryResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ZoteroLibraryItem"},"type":"array","title":"Items"},"remaining_slots":{"type":"integer","title":"Remaining Slots"}},"type":"object","required":["items","remaining_slots"],"title":"ZoteroLibraryResponse"},"ZoteroStatusResponse":{"properties":{"connected":{"type":"boolean","title":"Connected"},"connected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Connected At"},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Synced At"}},"type":"object","required":["connected"],"title":"ZoteroStatusResponse"},"ZoteroSyncResponse":{"properties":{"synced_papers_count":{"type":"integer","title":"Synced Papers Count"},"new_annotations_count":{"type":"integer","title":"New Annotations Count"}},"type":"object","required":["synced_papers_count","new_annotations_count"],"title":"ZoteroSyncResponse"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"Authorization"}}}}