{"openapi":"3.1.0","info":{"title":"DocXNinja Unified Extractor API","version":"0.1.0"},"servers":[{"url":"https://api.docextract.in","description":"Production Environment"},{"url":"/","description":"Default/Local Environment"}],"paths":{"/health":{"get":{"summary":"Health Check","description":"Health check endpoint for Firebase emulator","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/__/health":{"get":{"summary":"Health Check","description":"Health check endpoint for Firebase emulator","operationId":"health_check____health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/generate-api-key":{"post":{"summary":"Generate Api Key Endpoint","description":"Generate and assign API key for a logged-in premium Firebase user","operationId":"generate_api_key_endpoint_generate_api_key_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/get-api-key":{"get":{"summary":"Get Api Key Endpoint","description":"Return user's existing API key (premium users only)","operationId":"get_api_key_endpoint_get_api_key_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/user_documents":{"get":{"summary":"List Documents Endpoint","description":"List user's documents from Firestore (Users/{uid}/documents).","operationId":"list_documents_endpoint_user_documents_get","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","description":"Authorization token. Use 'Api-Key <DOCXNINJA_API_KEY>' or Firebase ID token with 'Bearer'.","examples":["Api-Key sk_123456789abcdefgh9876543210mnopqrstuvwxyz012345"],"title":"Authorization"},"description":"Authorization token. Use 'Api-Key <DOCXNINJA_API_KEY>' or Firebase ID token with 'Bearer'."}],"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":"Health check endpoint for unified API","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/bank/validate-password":{"post":{"tags":["Bank","Validation"],"summary":"Validate PDF password","description":"Checks if the provided password can decrypt the uploaded bank statement PDF(s).","operationId":"validate_password_bank_validate_password_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","description":"Authorization token. Use 'Api-Key <DOCXNINJA_API_KEY>' in header authorization","examples":["Api-Key sk_123456789abcdefgh9876543210mnopqrstuvwxyz012345"],"title":"Authorization"},"description":"Authorization token. Use 'Api-Key <DOCXNINJA_API_KEY>' in header authorization"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_validate_password_bank_validate_password_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/bank_mineru_nvidia_api__PasswordValidationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/bank/get-extraction-results":{"post":{"tags":["Bank","Retrieval"],"summary":"Get extraction results","description":"Retrieves stored bank statement extraction results from Cloud Storage.","operationId":"get_extraction_results_bank_get_extraction_results_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","description":"Authorization token. Use 'Api-Key <DOCXNINJA_API_KEY>' in header authorization","examples":["Api-Key sk_123456789abcdefgh9876543210mnopqrstuvwxyz012345"],"title":"Authorization"},"description":"Authorization token. Use 'Api-Key <DOCXNINJA_API_KEY>' in header authorization"}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_get_extraction_results_bank_get_extraction_results_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/bank_mineru_nvidia_api__ResultsFetchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/bank/extract":{"post":{"tags":["Bank","Extraction"],"summary":"Extract Bank Statement data","description":"Extracts metadata (bank info, account holder) and transactions from bank statements using our DocxNinja AI Pipeline.","operationId":"extract_pdf_bank_extract_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","description":"Authorization token. Use 'Api-Key <DOCXNINJA_API_KEY>' in header authorization","examples":["Api-Key sk_123456789abcdefgh9876543210mnopqrstuvwxyz012345"],"title":"Authorization"},"description":"Authorization token. Use 'Api-Key <DOCXNINJA_API_KEY>' in header authorization"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_extract_pdf_bank_extract_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankExtractionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/bank/":{"get":{"tags":["Bank"],"summary":"Root","description":"Health check endpoint","operationId":"root_bank__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/invoice/validate-password":{"post":{"tags":["Invoice","Validation"],"summary":"Validate PDF password","description":"Checks if the provided password can decrypt the uploaded PDF(s) without processing them.","operationId":"validate_password_invoice_validate_password_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","description":"Authorization token. Use 'Api-Key <DOCXNINJA_API_KEY>' in header authorization","examples":["Api-Key sk_123456789abcdefgh9876543210mnopqrstuvwxyz012345"],"title":"Authorization"},"description":"Authorization token. Use 'Api-Key <DOCXNINJA_API_KEY>' in header authorization"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_validate_password_invoice_validate_password_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoice_mineru_api__PasswordValidationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invoice/get-extraction-results":{"post":{"tags":["Invoice","Retrieval"],"summary":"Get extraction results","description":"Retrieves the detailed extraction results from Cloud Storage for a specific file.","operationId":"get_extraction_results_invoice_get_extraction_results_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","description":"Authorization token. Use 'Api-Key <DOCXNINJA_API_KEY>' in header authorization","examples":["Api-Key sk_123456789abcdefgh9876543210mnopqrstuvwxyz012345"],"title":"Authorization"},"description":"Authorization token. Use 'Api-Key <DOCXNINJA_API_KEY>' in header authorization"}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_get_extraction_results_invoice_get_extraction_results_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoice_mineru_api__ResultsFetchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invoice/extract":{"post":{"tags":["Invoice","Extraction"],"summary":"Extract Invoice data","description":"Extracts metadata and tables from invoice PDFs. Supports multiple files and password-protected documents.","operationId":"extract_invoice_invoice_extract_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","description":"Authorization token. Use 'Api-Key <DOCXNINJA_API_KEY>' in header authorization","examples":["Api-Key sk_123456789abcdefgh9876543210mnopqrstuvwxyz012345"],"title":"Authorization"},"description":"Authorization token. Use 'Api-Key <DOCXNINJA_API_KEY>' in header authorization"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_extract_invoice_invoice_extract_post"}}}},"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"}}}}}}},"/invoice/reextract-with-schema":{"post":{"tags":["Invoice","Extraction"],"summary":"Re-extract with custom schema","description":"Re-runs extraction using a user-provided schema on cached text. Costs only 1 credit.","operationId":"reextract_with_schema_invoice_reextract_with_schema_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","description":"Authorization token.","examples":["Api-Key sk_123456789abcdefgh9876543210mnopqrstuvwxyz012345"],"title":"Authorization"},"description":"Authorization token."}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_reextract_with_schema_invoice_reextract_with_schema_post"}}}},"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"}}}}}}},"/invoice/":{"get":{"tags":["Invoice"],"summary":"Root","operationId":"root_invoice__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/medical/validate-password":{"post":{"tags":["Medical","Validation"],"summary":"Validate PDF password","operationId":"validate_password_medical_validate_password_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","examples":["Api-Key sk_123456789abcdefgh9876543210mnopqrstuvwxyz012345"],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_validate_password_medical_validate_password_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/medical_mineru_api__PasswordValidationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medical/extract":{"post":{"tags":["Medical","Extraction"],"summary":"Extract Medical data","operationId":"extract_medical_doc_medical_extract_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","examples":["Api-Key sk_123456789abcdefgh9876543210mnopqrstuvwxyz012345"],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_extract_medical_doc_medical_extract_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MedicalExtractionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medical/reextract-with-schema":{"post":{"tags":["Medical","Extraction"],"summary":"Re-extract with custom schema","operationId":"reextract_with_schema_medical_reextract_with_schema_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","examples":["Api-Key sk_123456789abcdefgh9876543210mnopqrstuvwxyz012345"],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_reextract_with_schema_medical_reextract_with_schema_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MedicalExtractionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medical/get-extraction-results":{"post":{"tags":["Medical","Retrieval"],"summary":"Get extraction results","operationId":"get_extraction_results_medical_get_extraction_results_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","examples":["Api-Key sk_123456789abcdefgh9876543210mnopqrstuvwxyz012345"],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_get_extraction_results_medical_get_extraction_results_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/medical_mineru_api__ResultsFetchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medical/":{"get":{"tags":["Medical"],"summary":"Root","operationId":"root_medical__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/misc/validate-password":{"post":{"tags":["Miscellaneous","Validation"],"summary":"Validate PDF password","operationId":"validate_password_misc_validate_password_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","examples":["Api-Key sk_123456789abcdefgh9876543210mnopqrstuvwxyz012345"],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_validate_password_misc_validate_password_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/misc_mineru_api__PasswordValidationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/misc/extract":{"post":{"tags":["Miscellaneous","Extraction"],"summary":"Extract Miscellaneous Document data","description":"Extracts data from any document type from any country. Pass document_type as a free-text description (e.g. 'Passport', 'Driving Licence', 'Aadhaar Card', 'Business Contract', 'University Degree'). The language parameter controls which language is extracted from bilingual documents.","operationId":"extract_misc_document_misc_extract_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","examples":["Api-Key sk_123456789abcdefgh9876543210mnopqrstuvwxyz012345"],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_extract_misc_document_misc_extract_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MiscExtractionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/misc/reextract-with-schema":{"post":{"tags":["Miscellaneous","Extraction"],"summary":"Re-extract with custom schema","operationId":"reextract_with_schema_misc_reextract_with_schema_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","examples":["Api-Key sk_123456789abcdefgh9876543210mnopqrstuvwxyz012345"],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_reextract_with_schema_misc_reextract_with_schema_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MiscExtractionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/misc/get-extraction-results":{"post":{"tags":["Miscellaneous","Retrieval"],"summary":"Get extraction results","operationId":"get_extraction_results_misc_get_extraction_results_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","examples":["Api-Key sk_123456789abcdefgh9876543210mnopqrstuvwxyz012345"],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_get_extraction_results_misc_get_extraction_results_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/misc_mineru_api__ResultsFetchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/misc/":{"get":{"tags":["Miscellaneous"],"summary":"Root","operationId":"root_misc__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"BankExtractionResponse":{"properties":{"status":{"type":"string","title":"Status","examples":["success"]},"user_id":{"type":"string","title":"User Id","examples":["user_123"]},"tier":{"type":"string","title":"Tier","examples":["premium"]},"file":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File","examples":["statement.pdf"]},"bank_info":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Bank Info"},"account_holder":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Account Holder"},"transactions":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Transactions"},"results":{"anyOf":[{"items":{"$ref":"#/components/schemas/BankExtractionResult"},"type":"array"},{"type":"null"}],"title":"Results"},"storage":{"anyOf":[{"$ref":"#/components/schemas/BankStorageLinks"},{"type":"null"}]},"message":{"type":"string","title":"Message","examples":["Bank Statement stored in Google Cloud Storage"]}},"type":"object","required":["status","user_id","tier","message"],"title":"BankExtractionResponse"},"BankExtractionResult":{"properties":{"file":{"type":"string","title":"File","examples":["statement.pdf"]},"bank_info":{"additionalProperties":true,"type":"object","title":"Bank Info","description":"Extracted bank metadata"},"account_holder":{"additionalProperties":true,"type":"object","title":"Account Holder","description":"Extracted account holder info"},"transactions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Transactions","description":"List of bank transactions"},"storage":{"$ref":"#/components/schemas/BankStorageLinks"}},"type":"object","required":["file","bank_info","account_holder","transactions","storage"],"title":"BankExtractionResult"},"BankStorageLinks":{"properties":{"pdf_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pdf Url","examples":["https://storage.googleapis.com/..."]},"metadata_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metadata Url","examples":["https://storage.googleapis.com/..."]},"tables_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tables Url","examples":["https://storage.googleapis.com/..."]},"complete_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Complete Url","examples":["https://storage.googleapis.com/..."]}},"type":"object","title":"BankStorageLinks"},"Body_extract_invoice_invoice_extract_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"},"passwords":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Passwords"},"extraction_schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extraction Schema"},"effort":{"type":"string","title":"Effort","default":"medium"},"max_pages":{"type":"integer","title":"Max Pages","default":10},"enable_formula":{"type":"boolean","title":"Enable Formula","default":true},"enable_table":{"type":"boolean","title":"Enable Table","default":true},"enable_layout":{"type":"boolean","title":"Enable Layout","default":true},"force_ocr":{"type":"boolean","title":"Force Ocr","default":false}},"type":"object","required":["files"],"title":"Body_extract_invoice_invoice_extract_post"},"Body_extract_medical_doc_medical_extract_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"},"passwords":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Passwords"},"effort":{"type":"string","title":"Effort","default":"medium"},"max_pages":{"type":"integer","title":"Max Pages","default":10},"enable_formula":{"type":"boolean","title":"Enable Formula","default":true},"enable_table":{"type":"boolean","title":"Enable Table","default":true},"force_ocr":{"type":"boolean","title":"Force Ocr","default":false}},"type":"object","required":["files"],"title":"Body_extract_medical_doc_medical_extract_post"},"Body_extract_misc_document_misc_extract_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files","description":"One or multiple document PDFs"},"document_type":{"type":"string","title":"Document Type","description":"Free-text document type, e.g. 'Passport', 'Driving Licence', 'PAN Card', 'Business Agreement'"},"passwords":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Passwords"},"extraction_schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extraction Schema","description":"Optional JSON schema for custom extraction"},"effort":{"type":"string","title":"Effort","description":"AI processing effort (high, medium)","default":"medium"},"max_pages":{"type":"integer","title":"Max Pages","default":10},"enable_formula":{"type":"boolean","title":"Enable Formula","default":true},"enable_table":{"type":"boolean","title":"Enable Table","default":true},"enable_layout":{"type":"boolean","title":"Enable Layout","default":true},"force_ocr":{"type":"boolean","title":"Force Ocr","default":false}},"type":"object","required":["files","document_type"],"title":"Body_extract_misc_document_misc_extract_post"},"Body_extract_pdf_bank_extract_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files","description":"Upload one or multiple bank statement PDF files"},"passwords":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Passwords","description":"Optional passwords for encrypted PDFs, in order of files"},"effort":{"type":"string","title":"Effort","description":"AI processing effort (high, medium)","default":"medium"},"max_pages":{"type":"integer","title":"Max Pages","description":"Maximum pages to process per file","default":10},"force_ocr":{"type":"boolean","title":"Force Ocr","description":"Force OCR extraction pipeline","default":false},"enable_layout":{"type":"boolean","title":"Enable Layout","description":"Enable layout detection in MinerU","default":true}},"type":"object","required":["files"],"title":"Body_extract_pdf_bank_extract_post"},"Body_get_extraction_results_bank_get_extraction_results_post":{"properties":{"filename":{"type":"string","title":"Filename"}},"type":"object","required":["filename"],"title":"Body_get_extraction_results_bank_get_extraction_results_post"},"Body_get_extraction_results_invoice_get_extraction_results_post":{"properties":{"filename":{"type":"string","title":"Filename"}},"type":"object","required":["filename"],"title":"Body_get_extraction_results_invoice_get_extraction_results_post"},"Body_get_extraction_results_medical_get_extraction_results_post":{"properties":{"filename":{"type":"string","title":"Filename"}},"type":"object","required":["filename"],"title":"Body_get_extraction_results_medical_get_extraction_results_post"},"Body_get_extraction_results_misc_get_extraction_results_post":{"properties":{"filename":{"type":"string","title":"Filename"}},"type":"object","required":["filename"],"title":"Body_get_extraction_results_misc_get_extraction_results_post"},"Body_reextract_with_schema_invoice_reextract_with_schema_post":{"properties":{"filename":{"type":"string","title":"Filename"},"schema":{"type":"string","title":"Schema"}},"type":"object","required":["filename","schema"],"title":"Body_reextract_with_schema_invoice_reextract_with_schema_post"},"Body_reextract_with_schema_medical_reextract_with_schema_post":{"properties":{"filename":{"type":"string","title":"Filename"},"schema":{"type":"string","title":"Schema"}},"type":"object","required":["filename","schema"],"title":"Body_reextract_with_schema_medical_reextract_with_schema_post"},"Body_reextract_with_schema_misc_reextract_with_schema_post":{"properties":{"filename":{"type":"string","title":"Filename"},"schema":{"type":"string","title":"Schema"},"effort":{"type":"string","title":"Effort","default":"medium"}},"type":"object","required":["filename","schema"],"title":"Body_reextract_with_schema_misc_reextract_with_schema_post"},"Body_validate_password_bank_validate_password_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_validate_password_bank_validate_password_post"},"Body_validate_password_invoice_validate_password_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_validate_password_invoice_validate_password_post"},"Body_validate_password_medical_validate_password_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_validate_password_medical_validate_password_post"},"Body_validate_password_misc_validate_password_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_validate_password_misc_validate_password_post"},"CreditInfo":{"properties":{"deducted":{"type":"integer","title":"Deducted","examples":[1]},"remaining":{"type":"integer","title":"Remaining","examples":[99]}},"type":"object","required":["deducted","remaining"],"title":"CreditInfo"},"ExtractionResult":{"properties":{"file":{"type":"string","title":"File","examples":["invoice.pdf"]},"extracted_data":{"additionalProperties":true,"type":"object","title":"Extracted Data","description":"Variable schema based on invoice content"},"schema_json":{"additionalProperties":true,"type":"object","title":"Schema Json","description":"The schema used for extraction"},"tables":{"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"type":"array","title":"Tables","description":"List of extracted tables as lists of row dicts"},"storage":{"$ref":"#/components/schemas/invoice_mineru_api__StorageLinks"}},"type":"object","required":["file","extracted_data","schema_json","tables","storage"],"title":"ExtractionResult"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InvoiceExtractionResponse":{"properties":{"status":{"type":"string","title":"Status","examples":["success"]},"user_id":{"type":"string","title":"User Id","examples":["user_123"]},"tier":{"type":"string","title":"Tier","examples":["premium"]},"file":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File","examples":["invoice.pdf"]},"extracted_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extracted Data"},"schema_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Schema Json"},"tables":{"anyOf":[{"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Tables"},"results":{"anyOf":[{"items":{"$ref":"#/components/schemas/ExtractionResult"},"type":"array"},{"type":"null"}],"title":"Results"},"storage":{"anyOf":[{"$ref":"#/components/schemas/invoice_mineru_api__StorageLinks"},{"type":"null"}]},"credits":{"$ref":"#/components/schemas/CreditInfo"},"message":{"type":"string","title":"Message","examples":["Invoice stored in Google Cloud Storage"]}},"type":"object","required":["status","user_id","tier","credits","message"],"title":"InvoiceExtractionResponse"},"MedicalExtractionResponse":{"properties":{"status":{"type":"string","title":"Status"},"user_id":{"type":"string","title":"User Id"},"tier":{"type":"string","title":"Tier"},"file":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File"},"extracted_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extracted Data"},"schema_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Schema Json"},"tables":{"anyOf":[{"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Tables"},"image_paths":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Image Paths"},"image_urls":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Image Urls"},"results":{"anyOf":[{"items":{"$ref":"#/components/schemas/MedicalExtractionResult"},"type":"array"},{"type":"null"}],"title":"Results"},"storage":{"anyOf":[{"$ref":"#/components/schemas/medical_mineru_api__StorageLinks"},{"type":"null"}]},"credits":{"$ref":"#/components/schemas/CreditInfo"},"message":{"type":"string","title":"Message"}},"type":"object","required":["status","user_id","tier","credits","message"],"title":"MedicalExtractionResponse"},"MedicalExtractionResult":{"properties":{"file":{"type":"string","title":"File"},"extracted_data":{"additionalProperties":true,"type":"object","title":"Extracted Data"},"schema_json":{"additionalProperties":true,"type":"object","title":"Schema Json"},"tables":{"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"type":"array","title":"Tables"},"image_paths":{"items":{"type":"string"},"type":"array","title":"Image Paths"},"image_urls":{"additionalProperties":{"type":"string"},"type":"object","title":"Image Urls"},"storage":{"$ref":"#/components/schemas/medical_mineru_api__StorageLinks"}},"type":"object","required":["file","extracted_data","schema_json","tables","image_paths","image_urls","storage"],"title":"MedicalExtractionResult"},"MiscExtractionResponse":{"properties":{"status":{"type":"string","title":"Status"},"user_id":{"type":"string","title":"User Id"},"tier":{"type":"string","title":"Tier"},"file":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File"},"extracted_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extracted Data"},"schema_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Schema Json"},"tables":{"anyOf":[{"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Tables"},"classified_images":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"title":"Classified Images"},"results":{"anyOf":[{"items":{"$ref":"#/components/schemas/MiscExtractionResult"},"type":"array"},{"type":"null"}],"title":"Results"},"storage":{"anyOf":[{"$ref":"#/components/schemas/misc_mineru_api__StorageLinks"},{"type":"null"}]},"credits":{"$ref":"#/components/schemas/CreditInfo"},"message":{"type":"string","title":"Message"}},"type":"object","required":["status","user_id","tier","credits","message"],"title":"MiscExtractionResponse"},"MiscExtractionResult":{"properties":{"file":{"type":"string","title":"File"},"extracted_data":{"additionalProperties":true,"type":"object","title":"Extracted Data"},"schema_json":{"additionalProperties":true,"type":"object","title":"Schema Json"},"tables":{"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"type":"array","title":"Tables"},"classified_images":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"title":"Classified Images"},"storage":{"$ref":"#/components/schemas/misc_mineru_api__StorageLinks"}},"type":"object","required":["file","extracted_data","schema_json","tables","storage"],"title":"MiscExtractionResult"},"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"},"bank_mineru_nvidia_api__PasswordValidationResponse":{"properties":{"status":{"type":"string","title":"Status","examples":["valid"]},"file":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File","examples":["locked.pdf"]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["status"],"title":"PasswordValidationResponse"},"bank_mineru_nvidia_api__ResultsFetchResponse":{"properties":{"status":{"type":"string","title":"Status","examples":["success"]},"fileName":{"type":"string","title":"Filename","examples":["statement.pdf"]},"bank_info":{"additionalProperties":true,"type":"object","title":"Bank Info"},"account_holder":{"additionalProperties":true,"type":"object","title":"Account Holder"},"transactions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Transactions"}},"type":"object","required":["status","fileName","bank_info","account_holder","transactions"],"title":"ResultsFetchResponse"},"invoice_mineru_api__PasswordValidationResponse":{"properties":{"status":{"type":"string","title":"Status","examples":["valid"]},"file":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File","examples":["locked.pdf"]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["status"],"title":"PasswordValidationResponse"},"invoice_mineru_api__ResultsFetchResponse":{"properties":{"status":{"type":"string","title":"Status","examples":["success"]},"fileName":{"type":"string","title":"Filename","examples":["invoice.pdf"]},"extracted_data":{"additionalProperties":true,"type":"object","title":"Extracted Data"},"schema_json":{"additionalProperties":true,"type":"object","title":"Schema Json"},"tables":{"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"type":"array","title":"Tables"},"extracted_text":{"type":"string","title":"Extracted Text"}},"type":"object","required":["status","fileName","extracted_data","schema_json","tables","extracted_text"],"title":"ResultsFetchResponse"},"invoice_mineru_api__StorageLinks":{"properties":{"pdf_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pdf Url","examples":["https://storage.googleapis.com/..."]},"metadata_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metadata Url","examples":["https://storage.googleapis.com/..."]},"tables_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tables Url","examples":["https://storage.googleapis.com/..."]},"complete_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Complete Url","examples":["https://storage.googleapis.com/..."]}},"type":"object","title":"StorageLinks"},"medical_mineru_api__PasswordValidationResponse":{"properties":{"status":{"type":"string","title":"Status"},"file":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["status"],"title":"PasswordValidationResponse"},"medical_mineru_api__ResultsFetchResponse":{"properties":{"status":{"type":"string","title":"Status"},"fileName":{"type":"string","title":"Filename"},"extracted_data":{"additionalProperties":true,"type":"object","title":"Extracted Data"},"schema_json":{"additionalProperties":true,"type":"object","title":"Schema Json"},"tables":{"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"type":"array","title":"Tables"},"extracted_text":{"type":"string","title":"Extracted Text"}},"type":"object","required":["status","fileName","extracted_data","schema_json","tables","extracted_text"],"title":"ResultsFetchResponse"},"medical_mineru_api__StorageLinks":{"properties":{"pdf_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pdf Url"},"metadata_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metadata Url"},"tables_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tables Url"},"complete_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Complete Url"},"image_urls":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Image Urls"}},"type":"object","title":"StorageLinks"},"misc_mineru_api__PasswordValidationResponse":{"properties":{"status":{"type":"string","title":"Status"},"file":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["status"],"title":"PasswordValidationResponse"},"misc_mineru_api__ResultsFetchResponse":{"properties":{"status":{"type":"string","title":"Status"},"fileName":{"type":"string","title":"Filename"},"extracted_data":{"additionalProperties":true,"type":"object","title":"Extracted Data"},"schema_json":{"additionalProperties":true,"type":"object","title":"Schema Json"},"tables":{"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"type":"array","title":"Tables"},"extracted_text":{"type":"string","title":"Extracted Text"}},"type":"object","required":["status","fileName","extracted_data","schema_json","tables","extracted_text"],"title":"ResultsFetchResponse"},"misc_mineru_api__StorageLinks":{"properties":{"pdf_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pdf Url"},"metadata_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metadata Url"},"tables_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tables Url"},"complete_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Complete Url"},"image_urls":{"anyOf":[{"additionalProperties":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"},"type":"object"},{"type":"null"}],"title":"Image Urls"},"images_zip_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Images Zip Url"}},"type":"object","title":"StorageLinks"}}}}