{"openapi":"3.1.0","info":{"title":"AllPDFMagic API","description":"\n## AllPDFMagic API\n\nA powerful API for PDF processing and AI-powered document intelligence.\n\n### Features:\n- **PDF Processing**: Compress, merge, split, rotate PDFs\n- **Smart Optimizer**: Preset-based optimization for email, web, print\n- **AI Invoice Extraction**: Extract structured data from invoices\n- **OCR**: Extract text from scanned documents\n- **Table Extraction**: Extract tables to Excel\n- **Bulk Processing**: Process multiple files at once\n\n### Authentication:\nAll endpoints require a valid Supabase JWT token passed in the Authorization header:\n```\nAuthorization: Bearer <your-token>\n```\n\nAI features (invoice extraction, summarization) require a Pro subscription.\n    ","version":"1.0.0"},"paths":{"/api/v1/health":{"get":{"tags":["Health"],"summary":"Health Check","description":"Basic health check endpoint.","operationId":"health_check_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/health/ready":{"get":{"tags":["Health"],"summary":"Readiness Check","description":"Readiness check - verifies all dependencies are available.","operationId":"readiness_check_api_v1_health_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/mcp":{"get":{"tags":["MCP"],"summary":"Mcp Get","operationId":"mcp_get_mcp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["MCP"],"summary":"Mcp Endpoint","operationId":"mcp_endpoint_mcp_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/pdf/compress":{"post":{"tags":["PDF Processing"],"summary":"Compress Pdf","description":"Compress a PDF file. Returns the compressed PDF with streaming for better performance.","operationId":"compress_pdf_api_v1_pdf_compress_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_compress_pdf_api_v1_pdf_compress_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pdf/merge":{"post":{"tags":["PDF Processing"],"summary":"Merge Pdfs","description":"Merge multiple PDF files into one. Returns with streaming for better performance.","operationId":"merge_pdfs_api_v1_pdf_merge_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_merge_pdfs_api_v1_pdf_merge_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pdf/split":{"post":{"tags":["PDF Processing"],"summary":"Split Pdf","description":"Split PDF by page ranges. Returns a ZIP file with streaming.","operationId":"split_pdf_api_v1_pdf_split_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_split_pdf_api_v1_pdf_split_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pdf/delete-pages":{"post":{"tags":["PDF Processing"],"summary":"Delete Pages","description":"Delete specified pages from PDF. Returns with streaming for better performance.","operationId":"delete_pages_api_v1_pdf_delete_pages_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_delete_pages_api_v1_pdf_delete_pages_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pdf/page-count":{"post":{"tags":["PDF Processing"],"summary":"Get Page Count","description":"Get the number of pages in a PDF.","operationId":"get_page_count_api_v1_pdf_page_count_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_get_page_count_api_v1_pdf_page_count_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pdf/extract-pages":{"post":{"tags":["PDF Processing"],"summary":"Extract Pages","description":"Extract specified pages from PDF. Returns with streaming for better performance.","operationId":"extract_pages_api_v1_pdf_extract_pages_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_extract_pages_api_v1_pdf_extract_pages_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pdf/reorder-pages":{"post":{"tags":["PDF Processing"],"summary":"Reorder Pages","description":"Reorder PDF pages. Returns with streaming for better performance.","operationId":"reorder_pages_api_v1_pdf_reorder_pages_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_reorder_pages_api_v1_pdf_reorder_pages_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pdf/rotate":{"post":{"tags":["PDF Processing"],"summary":"Rotate Pdf","description":"Rotate PDF pages. Returns with streaming for better performance.","operationId":"rotate_pdf_api_v1_pdf_rotate_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_rotate_pdf_api_v1_pdf_rotate_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pdf/watermark":{"post":{"tags":["PDF Processing"],"summary":"Add Watermark","description":"Add watermark to PDF. Returns with streaming for better performance.","operationId":"add_watermark_api_v1_pdf_watermark_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_add_watermark_api_v1_pdf_watermark_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pdf/protect":{"post":{"tags":["PDF Processing"],"summary":"Protect Pdf","description":"Protect PDF with password. Returns with streaming for better performance.","operationId":"protect_pdf_api_v1_pdf_protect_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_protect_pdf_api_v1_pdf_protect_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pdf/unlock":{"post":{"tags":["PDF Processing"],"summary":"Unlock Pdf","description":"Unlock PDF. Returns with streaming for better performance.","operationId":"unlock_pdf_api_v1_pdf_unlock_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_unlock_pdf_api_v1_pdf_unlock_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pdf/flatten":{"post":{"tags":["PDF Processing"],"summary":"Flatten Pdf","description":"Flatten PDF. Returns with streaming for better performance.","operationId":"flatten_pdf_api_v1_pdf_flatten_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_flatten_pdf_api_v1_pdf_flatten_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pdf/number-pages":{"post":{"tags":["PDF Processing"],"summary":"Number Pages","description":"Add page numbers to PDF. Returns with streaming for better performance.","operationId":"number_pages_api_v1_pdf_number_pages_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_number_pages_api_v1_pdf_number_pages_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pdf/ocr":{"post":{"tags":["PDF Processing"],"summary":"Ocr Pdf","description":"OCR PDF. Returns with streaming for better performance.","operationId":"ocr_pdf_api_v1_pdf_ocr_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_ocr_pdf_api_v1_pdf_ocr_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/ai/extract-invoice":{"post":{"tags":["AI Document Intelligence"],"summary":"Extract Invoice Data","description":"Extract structured data from an invoice PDF using AI.\n\nReturns vendor info, buyer info, amounts, tax details, and line items.\nSupports multiple export formats: JSON, CSV, Excel, QuickBooks, Xero, Zoho.","operationId":"extract_invoice_data_api_v1_ai_extract_invoice_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_extract_invoice_data_api_v1_ai_extract_invoice_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceExtractionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/ai/parse-resume":{"post":{"tags":["AI Document Intelligence"],"summary":"Parse Resume","description":"Parse one or more resumes into structured, comparable candidate records.\n\nAccepts a single `file` or up to 10 `files`. When `job_description` is\nsupplied, each candidate is scored against it and the list is ranked;\nwithout one, candidates come back in upload order and carry no score —\nranking without something to rank against would be arbitrary.\n\nReturns candidates plus Excel/CSV/JSON download URLs.","operationId":"parse_resume_api_v1_ai_parse_resume_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_parse_resume_api_v1_ai_parse_resume_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/ai/ocr":{"post":{"tags":["AI Document Intelligence"],"summary":"Extract Text Ocr","description":"Extract text from scanned PDF or image using OCR.","operationId":"extract_text_ocr_api_v1_ai_ocr_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_extract_text_ocr_api_v1_ai_ocr_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/ai/extract-tables":{"post":{"tags":["AI Document Intelligence"],"summary":"Extract Tables","description":"Extract tables from PDF and export to Excel/CSV.","operationId":"extract_tables_api_v1_ai_extract_tables_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_extract_tables_api_v1_ai_extract_tables_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/ai/summarize":{"post":{"tags":["AI Document Intelligence"],"summary":"Summarize Pdf","description":"Generate an AI summary of a PDF document.\nUses caching for 95%+ faster responses on repeated requests.","operationId":"summarize_pdf_api_v1_ai_summarize_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_summarize_pdf_api_v1_ai_summarize_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/optimize/preset":{"post":{"tags":["Smart Optimizer"],"summary":"Optimize With Preset","description":"Optimize PDF using smart presets.\n\nPresets:\n- email: Compress to <25MB (email attachment limit)\n- web_2mb: Compress to <2MB (web upload)\n- web_5mb: Compress to <5MB (web upload)\n- web_10mb: Compress to <10MB (web upload)\n- print: High quality for printing (300 DPI)\n- archive: Maximum compression for storage\n- mobile: Fast loading on mobile devices","operationId":"optimize_with_preset_api_v1_optimize_preset_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_optimize_with_preset_api_v1_optimize_preset_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/optimize/to-size":{"post":{"tags":["Smart Optimizer"],"summary":"Optimize To Size","description":"Optimize PDF to a specific target size.","operationId":"optimize_to_size_api_v1_optimize_to_size_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_optimize_to_size_api_v1_optimize_to_size_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/bulk/upload":{"post":{"tags":["Bulk Processing"],"summary":"Bulk Upload","description":"Upload multiple files for bulk processing.\n\nOperations:\n- compress: Compress all PDFs\n- extract_invoice: Extract data from all invoices\n- optimize: Optimize with preset (specify in options)\n- summarize: AI summarize all PDFs (export to Excel/JSON)\n\nReturns a job ID to track progress.","operationId":"bulk_upload_api_v1_bulk_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_bulk_upload_api_v1_bulk_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/bulk/{job_id}":{"get":{"tags":["Bulk Processing"],"summary":"Get Job Status","description":"Get status of a bulk processing job.","operationId":"get_job_status_api_v1_bulk__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkJobStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/usage/check":{"get":{"tags":["Usage"],"summary":"Check Usage Limit","description":"Check current usage limits for the authenticated user.\n\nReturns:\n- allowed: Whether user can perform more operations\n- remaining: Number of operations remaining\n- limit: Total limit for current period\n- plan: User's current plan","operationId":"check_usage_limit_api_v1_usage_check_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/usage/stats":{"get":{"tags":["Usage"],"summary":"Get Usage Stats","description":"Get usage statistics for the authenticated user.\n\nArgs:\n    days: Number of days to look back (default: 30)\n\nReturns:\n- total_operations: Total number of operations\n- total_file_size: Total bytes processed\n- tool_breakdown: Operations by tool\n- daily_breakdown: Operations by date","operationId":"get_usage_stats_api_v1_usage_stats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/usage/history":{"get":{"tags":["Usage"],"summary":"Get Usage History","description":"Get paginated usage history for the authenticated user.","operationId":"get_usage_history_api_v1_usage_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/convert/pdf-to-word":{"post":{"tags":["Conversion"],"summary":"Pdf To Word","description":"Convert PDF to Word. Uses worker threads + streaming for 2x faster performance.","operationId":"pdf_to_word_api_v1_convert_pdf_to_word_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_pdf_to_word_api_v1_convert_pdf_to_word_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/convert/pdf-to-excel":{"post":{"tags":["Conversion"],"summary":"Pdf To Excel","description":"Convert PDF to Excel. Uses worker threads + streaming for 2x faster performance.","operationId":"pdf_to_excel_api_v1_convert_pdf_to_excel_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_pdf_to_excel_api_v1_convert_pdf_to_excel_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/convert/pdf-to-images":{"post":{"tags":["Conversion"],"summary":"Pdf To Images","description":"Convert PDF to images. Uses caching + lower DPI + worker threads for 2x faster performance.","operationId":"pdf_to_images_api_v1_convert_pdf_to_images_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_pdf_to_images_api_v1_convert_pdf_to_images_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/convert/word-to-pdf":{"post":{"tags":["Conversion"],"summary":"Word To Pdf","description":"Convert Word to PDF. Uses worker threads + streaming for 2x faster performance.","operationId":"word_to_pdf_api_v1_convert_word_to_pdf_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_word_to_pdf_api_v1_convert_word_to_pdf_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/convert/excel-to-pdf":{"post":{"tags":["Conversion"],"summary":"Excel To Pdf","description":"Convert Excel to PDF. Uses worker threads + streaming for 2x faster performance.","operationId":"excel_to_pdf_api_v1_convert_excel_to_pdf_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_excel_to_pdf_api_v1_convert_excel_to_pdf_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/convert/image-to-pdf":{"post":{"tags":["Conversion"],"summary":"Image To Pdf","description":"Convert image to PDF. Uses worker threads + streaming for 2x faster performance.","operationId":"image_to_pdf_api_v1_convert_image_to_pdf_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_image_to_pdf_api_v1_convert_image_to_pdf_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/convert/images-to-pdf":{"post":{"tags":["Conversion"],"summary":"Images To Pdf","description":"Convert images to PDF. Uses caching + worker threads + streaming for 2x faster performance.","operationId":"images_to_pdf_api_v1_convert_images_to_pdf_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_images_to_pdf_api_v1_convert_images_to_pdf_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/convert/pdf-to-text":{"post":{"tags":["Conversion"],"summary":"Pdf To Text","description":"Extract text from PDF. Uses caching + worker threads for 2x faster performance.","operationId":"pdf_to_text_api_v1_convert_pdf_to_text_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_pdf_to_text_api_v1_convert_pdf_to_text_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/convert/pdf-to-ppt":{"post":{"tags":["Conversion"],"summary":"Pdf To Ppt","description":"Convert PDF to PowerPoint. Uses worker threads + streaming for 2x faster performance.","operationId":"pdf_to_ppt_api_v1_convert_pdf_to_ppt_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_pdf_to_ppt_api_v1_convert_pdf_to_ppt_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/convert/ppt-to-pdf":{"post":{"tags":["Conversion"],"summary":"Ppt To Pdf","description":"Convert PowerPoint to PDF. Uses worker threads + streaming for 2x faster performance.","operationId":"ppt_to_pdf_api_v1_convert_ppt_to_pdf_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_ppt_to_pdf_api_v1_convert_ppt_to_pdf_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/chat/summarize":{"post":{"tags":["Chat & AI"],"summary":"Summarize Pdf","description":"Generate a comprehensive summary of a PDF document.\nUses caching for 95%+ faster responses on repeated requests.","operationId":"summarize_pdf_api_v1_chat_summarize_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_summarize_pdf_api_v1_chat_summarize_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/chat/upload":{"post":{"tags":["Chat & AI"],"summary":"Upload Document","description":"Upload a PDF for chat. Returns a document_id to use in chat requests.","operationId":"upload_document_api_v1_chat_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_document_api_v1_chat_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/chat/ask":{"post":{"tags":["Chat & AI"],"summary":"Chat With Pdf","description":"Ask a question about an uploaded PDF document.","operationId":"chat_with_pdf_api_v1_chat_ask_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/chat/translate":{"post":{"tags":["Chat & AI"],"summary":"Translate Pdf","description":"Translate PDF content to another language while preserving layout.","operationId":"translate_pdf_api_v1_chat_translate_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_translate_pdf_api_v1_chat_translate_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/chat/generate-questions":{"post":{"tags":["Chat & AI"],"summary":"Generate Questions","description":"Generate questions from PDF content for study or assessment.\nUses caching for 98%+ faster responses on repeated requests.","operationId":"generate_questions_api_v1_chat_generate_questions_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_generate_questions_api_v1_chat_generate_questions_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/chat/multi/create-session":{"post":{"tags":["Chat & AI"],"summary":"Create Multi Doc Session","description":"Create a new multi-document chat session.\n\nReturns a session_id that can be used to upload documents and ask questions.\nSessions expire after 1 hour of inactivity.","operationId":"create_multi_doc_session_api_v1_chat_multi_create_session_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/chat/multi/upload":{"post":{"tags":["Chat & AI"],"summary":"Upload To Multi Session","description":"Upload one or more PDFs to a multi-document chat session.\n\nMaximum 10 documents per session, 50MB total.","operationId":"upload_to_multi_session_api_v1_chat_multi_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_to_multi_session_api_v1_chat_multi_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/chat/multi/session/{session_id}":{"get":{"tags":["Chat & AI"],"summary":"Get Multi Session Info","description":"Get information about a multi-document chat session.","operationId":"get_multi_session_info_api_v1_chat_multi_session__session_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","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/v1/chat/multi/ask":{"post":{"tags":["Chat & AI"],"summary":"Ask Multi Documents","description":"Ask a question across all documents in a multi-document session.\n\nThe AI will analyze all uploaded documents and provide answers that:\n- Reference specific documents by name\n- Compare information across documents\n- Identify which document(s) contain the relevant information","operationId":"ask_multi_documents_api_v1_chat_multi_ask_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultiChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/chat/multi/summarize":{"post":{"tags":["Chat & AI"],"summary":"Summarize Multi Documents","description":"Summarize all documents in a multi-document session.\n\n- comparison_mode=False: Get an overall combined summary\n- comparison_mode=True: Get individual summaries plus comparison of similarities/differences","operationId":"summarize_multi_documents_api_v1_chat_multi_summarize_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_summarize_multi_documents_api_v1_chat_multi_summarize_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/sign/add-signature":{"post":{"tags":["Signing"],"summary":"Add Signature","description":"Add a signature image to a PDF.\n\n- **file**: The PDF file to sign\n- **signature**: The signature image (PNG/JPEG)\n- **page**: Page number (0-indexed)\n- **x, y**: Position from bottom-left corner\n- **width, height**: Size of the signature","operationId":"add_signature_api_v1_sign_add_signature_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_add_signature_api_v1_sign_add_signature_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/sign/add-signature-base64":{"post":{"tags":["Signing"],"summary":"Add Signature Base64","description":"Add a signature from base64 data (from canvas drawing).\n\n- **file**: The PDF file to sign\n- **signature_data**: Base64 encoded signature image\n- **page**: Page number (0-indexed)\n- **x, y**: Position from bottom-left corner","operationId":"add_signature_base64_api_v1_sign_add_signature_base64_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_add_signature_base64_api_v1_sign_add_signature_base64_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/sign/add-text-signature":{"post":{"tags":["Signing"],"summary":"Add Text Signature","description":"Add a typed text signature to a PDF.","operationId":"add_text_signature_api_v1_sign_add_text_signature_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_add_text_signature_api_v1_sign_add_text_signature_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workflows/normalize-data":{"post":{"tags":["Workflows"],"summary":"Normalize Data Workflow","description":"Normalize any document format to standardized JSON.\n\nConverts PDF, Excel, Word, images to a consistent JSON structure.\nUses caching for 99%+ faster responses on repeated requests.","operationId":"normalize_data_workflow_api_v1_workflows_normalize_data_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_normalize_data_workflow_api_v1_workflows_normalize_data_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workflows/normalize-batch":{"post":{"tags":["Workflows"],"summary":"Normalize Batch Workflow","description":"Normalize multiple files in batch.","operationId":"normalize_batch_workflow_api_v1_workflows_normalize_batch_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_normalize_batch_workflow_api_v1_workflows_normalize_batch_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workflows/validate-file":{"post":{"tags":["Workflows"],"summary":"Validate File Workflow","description":"Validate file against rules and compliance requirements.\n\nChecks file structure, format compliance, and required fields.","operationId":"validate_file_workflow_api_v1_workflows_validate_file_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_validate_file_workflow_api_v1_workflows_validate_file_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workflows/validate-batch":{"post":{"tags":["Workflows"],"summary":"Validate Batch Workflow","description":"Validate multiple files in batch.","operationId":"validate_batch_workflow_api_v1_workflows_validate_batch_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_validate_batch_workflow_api_v1_workflows_validate_batch_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workflows/process-onboarding":{"post":{"tags":["Workflows"],"summary":"Process Onboarding Workflow","description":"Process vendor/customer onboarding packet.\n\nClassifies documents, extracts data, and verifies completeness.","operationId":"process_onboarding_workflow_api_v1_workflows_process_onboarding_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_process_onboarding_workflow_api_v1_workflows_process_onboarding_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workflows/generate-filing":{"post":{"tags":["Workflows"],"summary":"Generate Filing Workflow","description":"Generate regulatory filing in prescribed format.\n\nCreates GST returns, VAT returns, payroll returns, etc.\n\nCan accept either:\n- File upload (Excel, PDF, etc.) - data will be extracted automatically\n- JSON data string - direct data input","operationId":"generate_filing_workflow_api_v1_workflows_generate_filing_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_generate_filing_workflow_api_v1_workflows_generate_filing_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workflows/available-filings":{"get":{"tags":["Workflows"],"summary":"Get Available Filings","description":"Get list of available filing types.","operationId":"get_available_filings_api_v1_workflows_available_filings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workflows/detect-duplicates":{"post":{"tags":["Workflows"],"summary":"Detect Duplicates Workflow","description":"Detect duplicate and similar documents.","operationId":"detect_duplicates_workflow_api_v1_workflows_detect_duplicates_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_detect_duplicates_workflow_api_v1_workflows_detect_duplicates_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workflows/auto-redact":{"post":{"tags":["Workflows"],"summary":"Auto Redact Workflow","description":"Automatically detect and redact PII from PDF.","operationId":"auto_redact_workflow_api_v1_workflows_auto_redact_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_auto_redact_workflow_api_v1_workflows_auto_redact_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workflows/check-consistency":{"post":{"tags":["Workflows"],"summary":"Check Consistency Workflow","description":"Check consistency across multiple documents.","operationId":"check_consistency_workflow_api_v1_workflows_check_consistency_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_check_consistency_workflow_api_v1_workflows_check_consistency_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workflows/compare-versions":{"post":{"tags":["Workflows"],"summary":"Compare Versions Workflow","description":"Compare two document versions and extract changes.","operationId":"compare_versions_workflow_api_v1_workflows_compare_versions_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_compare_versions_workflow_api_v1_workflows_compare_versions_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workflows/extract-clauses":{"post":{"tags":["Workflows"],"summary":"Extract Clauses Workflow","description":"Extract clauses, obligations, and deadlines from contracts/policies.","operationId":"extract_clauses_workflow_api_v1_workflows_extract_clauses_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_extract_clauses_workflow_api_v1_workflows_extract_clauses_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workflows/score-quality":{"post":{"tags":["Workflows"],"summary":"Score Quality Workflow","description":"Score document quality and AI-readiness.","operationId":"score_quality_workflow_api_v1_workflows_score_quality_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_score_quality_workflow_api_v1_workflows_score_quality_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workflows/tag-retention":{"post":{"tags":["Workflows"],"summary":"Tag Retention Workflow","description":"Tag document with retention period and expiry date.","operationId":"tag_retention_workflow_api_v1_workflows_tag_retention_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_tag_retention_workflow_api_v1_workflows_tag_retention_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workflows/retention-status":{"get":{"tags":["Workflows"],"summary":"Get Retention Status Workflow","description":"Get retention status for user's documents.","operationId":"get_retention_status_workflow_api_v1_workflows_retention_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflows/classify-documents":{"post":{"tags":["Workflows"],"summary":"Classify Documents Workflow","description":"Deterministic router for the \"just upload it\" entry point.\n\nClassifies each file (text + filename heuristics, no AI) and recommends\nwhich workflow to run. Free — routing is never charged against the quota.","operationId":"classify_documents_workflow_api_v1_workflows_classify_documents_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_classify_documents_workflow_api_v1_workflows_classify_documents_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workflows/process-bank-statement":{"post":{"tags":["Workflows"],"summary":"Process Bank Statement Workflow","description":"Process one or more bank statements: extract transactions, categorize, summarize.\n\nAccepts a single `file` or multiple `files` — multiple statements are merged\ninto one combined analysis (transactions tagged with their source file).","operationId":"process_bank_statement_workflow_api_v1_workflows_process_bank_statement_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_process_bank_statement_workflow_api_v1_workflows_process_bank_statement_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workflows/reconcile-documents":{"post":{"tags":["Workflows"],"summary":"Reconcile Documents Workflow","description":"Reconcile transactions across multiple documents.\n\nExamples:\n- Invoice vs Purchase Order\n- Bank Statement vs Accounting Ledger\n- Payment Receipt vs Invoice","operationId":"reconcile_documents_workflow_api_v1_workflows_reconcile_documents_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_reconcile_documents_workflow_api_v1_workflows_reconcile_documents_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workflows/detect-fraud":{"post":{"tags":["Workflows"],"summary":"Detect Fraud Workflow","description":"Enhanced fraud and duplicate detection with pattern analysis.\n\nDetects:\n- Duplicate transactions\n- Unusual amounts\n- Date anomalies\n- Vendor inconsistencies\n- Cross-document patterns","operationId":"detect_fraud_workflow_api_v1_workflows_detect_fraud_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_detect_fraud_workflow_api_v1_workflows_detect_fraud_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workflows/job/{job_id}":{"get":{"tags":["Workflows"],"summary":"Get Workflow Job Status","description":"Get status of a workflow job.","operationId":"get_workflow_job_status_api_v1_workflows_job__job_id__get","security":[{"HTTPBearer":[]}],"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/v1/workflows/usage":{"get":{"tags":["Workflow Usage"],"summary":"Get Workflow Usage","description":"Get current month's workflow usage.\n\nReturns:\n- Total operations used\n- Operations remaining in included limit\n- Breakdown by tool","operationId":"get_workflow_usage_api_v1_workflows_usage_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"month","in":"query","required":false,"schema":{"type":"string","title":"Month"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pipelines/trusted-data":{"post":{"tags":["Pipelines"],"summary":"Trusted Data Pipeline","description":"Turn any document(s) into trusted, validated data.\n\nThis pipeline combines:\n- Data Normalization (convert to JSON)\n- File Validation (verify structure and compliance)\n- Quality Scoring (assess data quality)\n\nSupports single or multiple files. Returns unified result with normalized data, validation status, and quality score.","operationId":"trusted_data_pipeline_api_v1_pipelines_trusted_data_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_trusted_data_pipeline_api_v1_pipelines_trusted_data_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pipelines/onboarding":{"post":{"tags":["Pipelines"],"summary":"Onboarding Pipeline","description":"Onboarding pipeline - optimized with parallel processing.","operationId":"onboarding_pipeline_api_v1_pipelines_onboarding_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_onboarding_pipeline_api_v1_pipelines_onboarding_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pipelines/risk-check":{"post":{"tags":["Pipelines"],"summary":"Risk Check Pipeline","description":"Risk check pipeline - optimized with parallel processing.","operationId":"risk_check_pipeline_api_v1_pipelines_risk_check_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_risk_check_pipeline_api_v1_pipelines_risk_check_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pipelines/contract-intel":{"post":{"tags":["Pipelines"],"summary":"Contract Intel Pipeline","description":"Contract intelligence pipeline - optimized with parallel processing.\n\nModes: single `file` (+ optional `old_file` for version diff), or `files`\n(3+ contracts) for portfolio analysis — every contract analyzed, items\ntagged with their source file.","operationId":"contract_intel_pipeline_api_v1_pipelines_contract_intel_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_contract_intel_pipeline_api_v1_pipelines_contract_intel_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/pipelines/regulatory":{"post":{"tags":["Pipelines"],"summary":"Regulatory Pipeline","description":"Regulatory pipeline - optimized with parallel processing.\n\nAccepts a single `file`, multiple `files` (consolidated filing — numeric\nfields summed across documents), or pre-extracted `data` JSON.","operationId":"regulatory_pipeline_api_v1_pipelines_regulatory_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_regulatory_pipeline_api_v1_pipelines_regulatory_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/webhooks/configs":{"get":{"tags":["Webhooks"],"summary":"List Webhook Configs","description":"List all webhook configurations for the user.","operationId":"list_webhook_configs_api_v1_webhooks_configs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response List Webhook Configs Api V1 Webhooks Configs Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Webhooks"],"summary":"Create Webhook Config","description":"Create a new webhook configuration.","operationId":"create_webhook_config_api_v1_webhooks_configs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookConfigCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Create Webhook Config Api V1 Webhooks Configs Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/webhooks/configs/{webhook_id}":{"get":{"tags":["Webhooks"],"summary":"Get Webhook Config","description":"Get a specific webhook configuration.","operationId":"get_webhook_config_api_v1_webhooks_configs__webhook_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Webhook Config Api V1 Webhooks Configs  Webhook Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Webhooks"],"summary":"Update Webhook Config","description":"Update a webhook configuration.","operationId":"update_webhook_config_api_v1_webhooks_configs__webhook_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookConfigUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Update Webhook Config Api V1 Webhooks Configs  Webhook Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete Webhook Config","description":"Delete a webhook configuration.","operationId":"delete_webhook_config_api_v1_webhooks_configs__webhook_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Delete Webhook Config Api V1 Webhooks Configs  Webhook Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/configs/{webhook_id}/deliveries":{"get":{"tags":["Webhooks"],"summary":"List Webhook Deliveries","description":"List webhook delivery logs for a specific webhook config.","operationId":"list_webhook_deliveries_api_v1_webhooks_configs__webhook_id__deliveries_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response List Webhook Deliveries Api V1 Webhooks Configs  Webhook Id  Deliveries Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/email/ingest":{"post":{"tags":["Email Ingestion"],"summary":"Ingest Email","description":"Webhook endpoint for Resend email ingestion.\n\nProcesses incoming emails, extracts attachments, and routes them to workflows\nbased on email-to-workflow mapping stored in Supabase.","operationId":"ingest_email_api_v1_email_ingest_post","parameters":[{"name":"x-resend-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Resend-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Root","description":"Root endpoint.","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AmountInfo":{"properties":{"currency":{"type":"string","title":"Currency","default":"USD"},"subtotal":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Subtotal"},"tax":{"anyOf":[{"$ref":"#/components/schemas/TaxInfo"},{"type":"null"}]},"shipping":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Shipping"},"discount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Discount"},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total"}},"type":"object","title":"AmountInfo"},"Body_add_signature_api_v1_sign_add_signature_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"signature":{"type":"string","format":"binary","title":"Signature"},"page":{"type":"integer","title":"Page","default":0},"x":{"type":"number","title":"X","default":100},"y":{"type":"number","title":"Y","default":100},"width":{"type":"number","title":"Width","default":200},"height":{"type":"number","title":"Height","default":100}},"type":"object","required":["file","signature"],"title":"Body_add_signature_api_v1_sign_add_signature_post"},"Body_add_signature_base64_api_v1_sign_add_signature_base64_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"signature_data":{"type":"string","title":"Signature Data"},"page":{"type":"integer","title":"Page","default":0},"x":{"type":"number","title":"X","default":100},"y":{"type":"number","title":"Y","default":100},"width":{"type":"number","title":"Width","default":200},"height":{"type":"number","title":"Height","default":100}},"type":"object","required":["file","signature_data"],"title":"Body_add_signature_base64_api_v1_sign_add_signature_base64_post"},"Body_add_text_signature_api_v1_sign_add_text_signature_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"text":{"type":"string","title":"Text"},"page":{"type":"integer","title":"Page","default":0},"x":{"type":"number","title":"X","default":100},"y":{"type":"number","title":"Y","default":100},"font_size":{"type":"number","title":"Font Size","default":24}},"type":"object","required":["file","text"],"title":"Body_add_text_signature_api_v1_sign_add_text_signature_post"},"Body_add_watermark_api_v1_pdf_watermark_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"text":{"type":"string","title":"Text","default":"CONFIDENTIAL"},"opacity":{"type":"integer","title":"Opacity","default":30},"position":{"type":"string","title":"Position","default":"diagonal"}},"type":"object","required":["file"],"title":"Body_add_watermark_api_v1_pdf_watermark_post"},"Body_auto_redact_workflow_api_v1_workflows_auto_redact_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"pii_types":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pii Types"}},"type":"object","required":["file"],"title":"Body_auto_redact_workflow_api_v1_workflows_auto_redact_post"},"Body_bulk_upload_api_v1_bulk_upload_post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"},"operation":{"type":"string","title":"Operation","description":"compress, extract_invoice, optimize"},"options":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Options","default":"{}"}},"type":"object","required":["files","operation"],"title":"Body_bulk_upload_api_v1_bulk_upload_post"},"Body_check_consistency_workflow_api_v1_workflows_check_consistency_post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"},"comparison_type":{"type":"string","title":"Comparison Type","default":"auto"}},"type":"object","required":["files"],"title":"Body_check_consistency_workflow_api_v1_workflows_check_consistency_post"},"Body_classify_documents_workflow_api_v1_workflows_classify_documents_post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_classify_documents_workflow_api_v1_workflows_classify_documents_post"},"Body_compare_versions_workflow_api_v1_workflows_compare_versions_post":{"properties":{"old_version":{"type":"string","format":"binary","title":"Old Version"},"new_version":{"type":"string","format":"binary","title":"New Version"}},"type":"object","required":["old_version","new_version"],"title":"Body_compare_versions_workflow_api_v1_workflows_compare_versions_post"},"Body_compress_pdf_api_v1_pdf_compress_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"level":{"$ref":"#/components/schemas/CompressionLevel","default":"medium"},"target_size_kb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Target Size Kb"}},"type":"object","required":["file"],"title":"Body_compress_pdf_api_v1_pdf_compress_post"},"Body_contract_intel_pipeline_api_v1_pipelines_contract_intel_post":{"properties":{"file":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"File"},"old_file":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"Old File"},"files":{"anyOf":[{"items":{"type":"string","format":"binary"},"type":"array"},{"type":"null"}],"title":"Files"}},"type":"object","title":"Body_contract_intel_pipeline_api_v1_pipelines_contract_intel_post"},"Body_delete_pages_api_v1_pdf_delete_pages_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"pages":{"type":"string","title":"Pages","description":"Comma-separated page numbers to delete (1-indexed)"}},"type":"object","required":["file","pages"],"title":"Body_delete_pages_api_v1_pdf_delete_pages_post"},"Body_detect_duplicates_workflow_api_v1_workflows_detect_duplicates_post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"},"similarity_threshold":{"type":"number","title":"Similarity Threshold","default":0.95}},"type":"object","required":["files"],"title":"Body_detect_duplicates_workflow_api_v1_workflows_detect_duplicates_post"},"Body_detect_fraud_workflow_api_v1_workflows_detect_fraud_post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"},"fraud_detection":{"type":"boolean","title":"Fraud Detection","default":true},"duplicate_detection":{"type":"boolean","title":"Duplicate Detection","default":true},"risk_threshold":{"type":"number","title":"Risk Threshold","default":0.7},"export_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Export Format"}},"type":"object","required":["files"],"title":"Body_detect_fraud_workflow_api_v1_workflows_detect_fraud_post"},"Body_excel_to_pdf_api_v1_convert_excel_to_pdf_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_excel_to_pdf_api_v1_convert_excel_to_pdf_post"},"Body_extract_clauses_workflow_api_v1_workflows_extract_clauses_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"document_type":{"type":"string","title":"Document Type","default":"contract"}},"type":"object","required":["file"],"title":"Body_extract_clauses_workflow_api_v1_workflows_extract_clauses_post"},"Body_extract_invoice_data_api_v1_ai_extract_invoice_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"export_format":{"$ref":"#/components/schemas/ExportFormat","default":"json"},"include_line_items":{"type":"boolean","title":"Include Line Items","default":true},"detect_tax_type":{"type":"boolean","title":"Detect Tax Type","default":true}},"type":"object","required":["file"],"title":"Body_extract_invoice_data_api_v1_ai_extract_invoice_post"},"Body_extract_pages_api_v1_pdf_extract_pages_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"pages":{"type":"string","title":"Pages","description":"Comma-separated page numbers to extract (1-indexed)"}},"type":"object","required":["file","pages"],"title":"Body_extract_pages_api_v1_pdf_extract_pages_post"},"Body_extract_tables_api_v1_ai_extract_tables_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"export_format":{"$ref":"#/components/schemas/ExportFormat","default":"excel"},"pages":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pages","description":"Comma-separated page numbers"}},"type":"object","required":["file"],"title":"Body_extract_tables_api_v1_ai_extract_tables_post"},"Body_extract_text_ocr_api_v1_ai_ocr_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_extract_text_ocr_api_v1_ai_ocr_post"},"Body_flatten_pdf_api_v1_pdf_flatten_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_flatten_pdf_api_v1_pdf_flatten_post"},"Body_generate_filing_workflow_api_v1_workflows_generate_filing_post":{"properties":{"filing_type":{"type":"string","title":"Filing Type"},"file":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"File"},"data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format"}},"type":"object","required":["filing_type"],"title":"Body_generate_filing_workflow_api_v1_workflows_generate_filing_post"},"Body_generate_questions_api_v1_chat_generate_questions_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"question_type":{"type":"string","title":"Question Type","default":"comprehension"},"num_questions":{"type":"integer","title":"Num Questions","default":10}},"type":"object","required":["file"],"title":"Body_generate_questions_api_v1_chat_generate_questions_post"},"Body_get_page_count_api_v1_pdf_page_count_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_get_page_count_api_v1_pdf_page_count_post"},"Body_image_to_pdf_api_v1_convert_image_to_pdf_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_image_to_pdf_api_v1_convert_image_to_pdf_post"},"Body_images_to_pdf_api_v1_convert_images_to_pdf_post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_images_to_pdf_api_v1_convert_images_to_pdf_post"},"Body_merge_pdfs_api_v1_pdf_merge_post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"},"file_order":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Order"}},"type":"object","required":["files"],"title":"Body_merge_pdfs_api_v1_pdf_merge_post"},"Body_normalize_batch_workflow_api_v1_workflows_normalize_batch_post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"},"extract_entities":{"type":"boolean","title":"Extract Entities","default":true},"include_tables":{"type":"boolean","title":"Include Tables","default":true}},"type":"object","required":["files"],"title":"Body_normalize_batch_workflow_api_v1_workflows_normalize_batch_post"},"Body_normalize_data_workflow_api_v1_workflows_normalize_data_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"extract_entities":{"type":"boolean","title":"Extract Entities","default":true},"include_tables":{"type":"boolean","title":"Include Tables","default":true},"include_images":{"type":"boolean","title":"Include Images","default":false}},"type":"object","required":["file"],"title":"Body_normalize_data_workflow_api_v1_workflows_normalize_data_post"},"Body_number_pages_api_v1_pdf_number_pages_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"position":{"type":"string","title":"Position","default":"bottom-center"},"start_number":{"type":"integer","title":"Start Number","default":1}},"type":"object","required":["file"],"title":"Body_number_pages_api_v1_pdf_number_pages_post"},"Body_ocr_pdf_api_v1_pdf_ocr_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"language":{"type":"string","title":"Language","default":"eng"}},"type":"object","required":["file"],"title":"Body_ocr_pdf_api_v1_pdf_ocr_post"},"Body_onboarding_pipeline_api_v1_pipelines_onboarding_post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"},"entity_type":{"type":"string","title":"Entity Type","default":"vendor"},"verification_level":{"type":"string","title":"Verification Level","default":"standard"}},"type":"object","required":["files"],"title":"Body_onboarding_pipeline_api_v1_pipelines_onboarding_post"},"Body_optimize_to_size_api_v1_optimize_to_size_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"target_size_mb":{"type":"number","title":"Target Size Mb","description":"Target size in MB"}},"type":"object","required":["file","target_size_mb"],"title":"Body_optimize_to_size_api_v1_optimize_to_size_post"},"Body_optimize_with_preset_api_v1_optimize_preset_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"preset":{"$ref":"#/components/schemas/OptimizerPreset","default":"web_5mb"}},"type":"object","required":["file"],"title":"Body_optimize_with_preset_api_v1_optimize_preset_post"},"Body_parse_resume_api_v1_ai_parse_resume_post":{"properties":{"file":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"File"},"files":{"anyOf":[{"items":{"type":"string","format":"binary"},"type":"array"},{"type":"null"}],"title":"Files"},"job_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Description"}},"type":"object","title":"Body_parse_resume_api_v1_ai_parse_resume_post"},"Body_pdf_to_excel_api_v1_convert_pdf_to_excel_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_pdf_to_excel_api_v1_convert_pdf_to_excel_post"},"Body_pdf_to_images_api_v1_convert_pdf_to_images_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"format":{"type":"string","title":"Format","default":"PNG"},"dpi":{"type":"integer","title":"Dpi","default":100}},"type":"object","required":["file"],"title":"Body_pdf_to_images_api_v1_convert_pdf_to_images_post"},"Body_pdf_to_ppt_api_v1_convert_pdf_to_ppt_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_pdf_to_ppt_api_v1_convert_pdf_to_ppt_post"},"Body_pdf_to_text_api_v1_convert_pdf_to_text_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_pdf_to_text_api_v1_convert_pdf_to_text_post"},"Body_pdf_to_word_api_v1_convert_pdf_to_word_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_pdf_to_word_api_v1_convert_pdf_to_word_post"},"Body_ppt_to_pdf_api_v1_convert_ppt_to_pdf_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_ppt_to_pdf_api_v1_convert_ppt_to_pdf_post"},"Body_process_bank_statement_workflow_api_v1_workflows_process_bank_statement_post":{"properties":{"file":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"File"},"files":{"anyOf":[{"items":{"type":"string","format":"binary"},"type":"array"},{"type":"null"}],"title":"Files"},"account_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Type"},"start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"},"export_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Export Format"}},"type":"object","title":"Body_process_bank_statement_workflow_api_v1_workflows_process_bank_statement_post"},"Body_process_onboarding_workflow_api_v1_workflows_process_onboarding_post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"},"entity_type":{"type":"string","title":"Entity Type","default":"vendor"},"verification_level":{"type":"string","title":"Verification Level","default":"standard"}},"type":"object","required":["files"],"title":"Body_process_onboarding_workflow_api_v1_workflows_process_onboarding_post"},"Body_protect_pdf_api_v1_pdf_protect_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"password":{"type":"string","title":"Password"}},"type":"object","required":["file","password"],"title":"Body_protect_pdf_api_v1_pdf_protect_post"},"Body_reconcile_documents_workflow_api_v1_workflows_reconcile_documents_post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"},"reconciliation_type":{"type":"string","title":"Reconciliation Type","default":"auto"},"matching_rules":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matching Rules"},"export_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Export Format"}},"type":"object","required":["files"],"title":"Body_reconcile_documents_workflow_api_v1_workflows_reconcile_documents_post"},"Body_regulatory_pipeline_api_v1_pipelines_regulatory_post":{"properties":{"filing_type":{"type":"string","title":"Filing Type"},"file":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"File"},"files":{"anyOf":[{"items":{"type":"string","format":"binary"},"type":"array"},{"type":"null"}],"title":"Files"},"data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format","default":"excel"}},"type":"object","required":["filing_type"],"title":"Body_regulatory_pipeline_api_v1_pipelines_regulatory_post"},"Body_reorder_pages_api_v1_pdf_reorder_pages_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"order":{"type":"string","title":"Order","description":"Comma-separated page numbers in new order (1-indexed)"}},"type":"object","required":["file","order"],"title":"Body_reorder_pages_api_v1_pdf_reorder_pages_post"},"Body_risk_check_pipeline_api_v1_pipelines_risk_check_post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_risk_check_pipeline_api_v1_pipelines_risk_check_post"},"Body_rotate_pdf_api_v1_pdf_rotate_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"rotation":{"type":"integer","title":"Rotation","description":"Rotation in degrees: 90, 180, or 270"},"pages":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pages","description":"Comma-separated page numbers (1-indexed)"}},"type":"object","required":["file","rotation"],"title":"Body_rotate_pdf_api_v1_pdf_rotate_post"},"Body_score_quality_workflow_api_v1_workflows_score_quality_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_score_quality_workflow_api_v1_workflows_score_quality_post"},"Body_split_pdf_api_v1_pdf_split_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"page_ranges":{"type":"string","title":"Page Ranges","description":"e.g., '1-3, 5, 7-10'"}},"type":"object","required":["file","page_ranges"],"title":"Body_split_pdf_api_v1_pdf_split_post"},"Body_summarize_multi_documents_api_v1_chat_multi_summarize_post":{"properties":{"session_id":{"type":"string","title":"Session Id"},"comparison_mode":{"type":"boolean","title":"Comparison Mode","default":false}},"type":"object","required":["session_id"],"title":"Body_summarize_multi_documents_api_v1_chat_multi_summarize_post"},"Body_summarize_pdf_api_v1_ai_summarize_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"max_length":{"type":"integer","title":"Max Length","description":"Maximum summary length in words","default":500}},"type":"object","required":["file"],"title":"Body_summarize_pdf_api_v1_ai_summarize_post"},"Body_summarize_pdf_api_v1_chat_summarize_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_summarize_pdf_api_v1_chat_summarize_post"},"Body_tag_retention_workflow_api_v1_workflows_tag_retention_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"document_id":{"type":"string","title":"Document Id"},"retention_period_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retention Period Days"},"document_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Type"}},"type":"object","required":["file","document_id"],"title":"Body_tag_retention_workflow_api_v1_workflows_tag_retention_post"},"Body_translate_pdf_api_v1_chat_translate_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"target_language":{"type":"string","title":"Target Language"},"source_language":{"type":"string","title":"Source Language","default":"auto"}},"type":"object","required":["file","target_language"],"title":"Body_translate_pdf_api_v1_chat_translate_post"},"Body_trusted_data_pipeline_api_v1_pipelines_trusted_data_post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"},"extract_entities":{"type":"boolean","title":"Extract Entities","default":true},"include_tables":{"type":"boolean","title":"Include Tables","default":true},"document_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Type"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"expected_fields":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Fields"},"export_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Export Format","default":"excel"}},"type":"object","required":["files"],"title":"Body_trusted_data_pipeline_api_v1_pipelines_trusted_data_post"},"Body_unlock_pdf_api_v1_pdf_unlock_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"password":{"type":"string","title":"Password","default":""}},"type":"object","required":["file"],"title":"Body_unlock_pdf_api_v1_pdf_unlock_post"},"Body_upload_document_api_v1_chat_upload_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_document_api_v1_chat_upload_post"},"Body_upload_to_multi_session_api_v1_chat_multi_upload_post":{"properties":{"session_id":{"type":"string","title":"Session Id"},"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"}},"type":"object","required":["session_id","files"],"title":"Body_upload_to_multi_session_api_v1_chat_multi_upload_post"},"Body_validate_batch_workflow_api_v1_workflows_validate_batch_post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"},"format_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format Type"}},"type":"object","required":["files"],"title":"Body_validate_batch_workflow_api_v1_workflows_validate_batch_post"},"Body_validate_file_workflow_api_v1_workflows_validate_file_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"format_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format Type"},"validation_rules":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Validation Rules"}},"type":"object","required":["file"],"title":"Body_validate_file_workflow_api_v1_workflows_validate_file_post"},"Body_word_to_pdf_api_v1_convert_word_to_pdf_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_word_to_pdf_api_v1_convert_word_to_pdf_post"},"BulkJobResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"$ref":"#/components/schemas/JobStatus"},"total_files":{"type":"integer","title":"Total Files"},"processed_files":{"type":"integer","title":"Processed Files"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["job_id","status","total_files","processed_files","created_at"],"title":"BulkJobResponse"},"BulkJobStatusResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"$ref":"#/components/schemas/JobStatus"},"total_files":{"type":"integer","title":"Total Files"},"processed_files":{"type":"integer","title":"Processed Files"},"failed_files":{"type":"integer","title":"Failed Files"},"results":{"anyOf":[{"items":{"type":"object"},"type":"array"},{"type":"null"}],"title":"Results"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["job_id","status","total_files","processed_files","failed_files"],"title":"BulkJobStatusResponse"},"BuyerInfo":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"}},"type":"object","title":"BuyerInfo"},"ChatMessage":{"properties":{"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"}},"type":"object","required":["role","content"],"title":"ChatMessage"},"ChatRequest":{"properties":{"document_id":{"type":"string","title":"Document Id"},"question":{"type":"string","title":"Question"},"history":{"anyOf":[{"items":{"$ref":"#/components/schemas/ChatMessage"},"type":"array"},{"type":"null"}],"title":"History"}},"type":"object","required":["document_id","question"],"title":"ChatRequest"},"CompressionLevel":{"type":"string","enum":["low","medium","high","maximum"],"title":"CompressionLevel"},"ExportFormat":{"type":"string","enum":["json","csv","excel","quickbooks","xero","zoho"],"title":"ExportFormat"},"FileResponse":{"properties":{"filename":{"type":"string","title":"Filename"},"download_url":{"type":"string","title":"Download Url"},"size_bytes":{"type":"integer","title":"Size Bytes"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["filename","download_url","size_bytes","expires_at"],"title":"FileResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InvoiceData":{"properties":{"document_type":{"type":"string","title":"Document Type","default":"invoice"},"confidence":{"type":"number","title":"Confidence","default":0.0},"vendor":{"$ref":"#/components/schemas/VendorInfo","default":{}},"buyer":{"$ref":"#/components/schemas/BuyerInfo","default":{}},"invoice":{"$ref":"#/components/schemas/InvoiceDetails","default":{}},"amounts":{"$ref":"#/components/schemas/AmountInfo","default":{"currency":"USD"}},"line_items":{"items":{"$ref":"#/components/schemas/LineItem"},"type":"array","title":"Line Items","default":[]},"raw_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Text"}},"type":"object","title":"InvoiceData"},"InvoiceDetails":{"properties":{"number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Due Date"},"po_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Po Number"}},"type":"object","title":"InvoiceDetails"},"InvoiceExtractionResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"data":{"$ref":"#/components/schemas/InvoiceData"},"export_file":{"anyOf":[{"$ref":"#/components/schemas/FileResponse"},{"type":"null"}]}},"type":"object","required":["success","data"],"title":"InvoiceExtractionResponse"},"JobStatus":{"type":"string","enum":["pending","processing","completed","failed"],"title":"JobStatus"},"LineItem":{"properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"quantity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Quantity"},"unit_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unit Price"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"tax_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tax Rate"}},"type":"object","title":"LineItem"},"MultiChatRequest":{"properties":{"session_id":{"type":"string","title":"Session Id"},"question":{"type":"string","title":"Question"},"history":{"anyOf":[{"items":{"$ref":"#/components/schemas/ChatMessage"},"type":"array"},{"type":"null"}],"title":"History"}},"type":"object","required":["session_id","question"],"title":"MultiChatRequest"},"OptimizerPreset":{"type":"string","enum":["email","web_2mb","web_5mb","web_10mb","print","archive","mobile"],"title":"OptimizerPreset"},"TaxInfo":{"properties":{"type":{"$ref":"#/components/schemas/TaxType","default":"Unknown"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"}},"type":"object","title":"TaxInfo"},"TaxType":{"type":"string","enum":["VAT","GST","Sales Tax","Consumption Tax","HST","PST","Unknown"],"title":"TaxType"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VendorInfo":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"}},"type":"object","title":"VendorInfo"},"WebhookConfigCreate":{"properties":{"webhook_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Webhook Url"},"webhook_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Secret"},"event_types":{"items":{"type":"string"},"type":"array","title":"Event Types","description":"List of event types to subscribe to","default":["workflow.completed","workflow.failed","batch.completed"]}},"type":"object","required":["webhook_url"],"title":"WebhookConfigCreate"},"WebhookConfigUpdate":{"properties":{"webhook_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Webhook Url"},"webhook_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Secret"},"event_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Event Types"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"WebhookConfigUpdate"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}