{"openapi":"3.1.0","info":{"title":"SOLAFLOW Hybrid OCR","description":"Local-first Japanese OCR API with async jobs, sync recognition, per-app keys, idempotency and signed webhooks.","version":"4.1.3"},"paths":{"/":{"get":{"summary":"Index","operationId":"index__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/integrations":{"get":{"summary":"Integrations Page","operationId":"integrations_page_integrations_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/admin-console":{"get":{"summary":"Admin Console Page","operationId":"admin_console_page_admin_console_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ready":{"get":{"summary":"Ready","operationId":"ready_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/core/ocr-router":{"get":{"summary":"Legacy Router Status","operationId":"legacy_router_status_core_ocr_router_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/integration/capabilities":{"get":{"summary":"Integration Capabilities","operationId":"integration_capabilities_api_v1_integration_capabilities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/system/status":{"get":{"summary":"System Status","operationId":"system_status_api_v1_system_status_get","parameters":[{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/metrics":{"get":{"summary":"System Metrics","operationId":"system_metrics_api_v1_metrics_get","parameters":[{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integration/me":{"get":{"summary":"Integration Me","operationId":"integration_me_api_v1_integration_me_get","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ocr":{"post":{"summary":"Public Ocr Submit","description":"Production server-to-server endpoint.\n\nDefault behavior is asynchronous: upload returns HTTP 202 immediately with job_id.\nSet wait_seconds (1..120) only when the caller intentionally wants a short synchronous wait.","operationId":"public_ocr_submit_ocr_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_public_ocr_submit_ocr_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ocr/{job_id}":{"get":{"summary":"Public Ocr Status","operationId":"public_ocr_status_ocr__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ocr/{job_id}/result":{"get":{"summary":"Public Ocr Result","operationId":"public_ocr_result_ocr__job_id__result_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"include_pages","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Pages"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ocr":{"post":{"summary":"Submit Ocr","operationId":"submit_ocr_api_v1_ocr_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_submit_ocr_api_v1_ocr_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ocr/base64":{"post":{"summary":"Submit Ocr Base64","operationId":"submit_ocr_base64_api_v1_ocr_base64_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Base64OCRIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/recognize":{"post":{"summary":"Recognize Sync","operationId":"recognize_sync_api_v1_recognize_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_recognize_sync_api_v1_recognize_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/recognize/simple":{"post":{"summary":"Recognize Sync Simple","description":"Easy integration endpoint: upload one file and receive text + fields directly.\n\nIf OCR cannot finish before timeout, returns HTTP 202 and the normal async job URLs.","operationId":"recognize_sync_simple_api_v1_recognize_simple_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_recognize_sync_simple_api_v1_recognize_simple_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gateway/ocr":{"post":{"summary":"Gateway Ocr","description":"HTTPS gateway endpoint for simple server-to-server integrations.\n\nv4 defaults to asynchronous processing so PHP does not block for minutes.\nSet wait_seconds only for a short intentional wait. HTTP 202 always includes polling URLs.","operationId":"gateway_ocr_api_v1_gateway_ocr_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_gateway_ocr_api_v1_gateway_ocr_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ocr/batch":{"post":{"summary":"Submit Batch","operationId":"submit_batch_api_v1_ocr_batch_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_submit_batch_api_v1_ocr_batch_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/batches/{batch_id}":{"get":{"summary":"Batch Status","operationId":"batch_status_api_v1_batches__batch_id__get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/by-client-id/{client_job_id}":{"get":{"summary":"Job By Client Id","operationId":"job_by_client_id_api_v1_jobs_by_client_id__client_job_id__get","parameters":[{"name":"client_job_id","in":"path","required":true,"schema":{"type":"string","title":"Client Job Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs":{"get":{"summary":"Jobs","operationId":"jobs_api_v1_jobs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Limit"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/{job_id}":{"get":{"summary":"Job","operationId":"job_api_v1_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/{job_id}/retry":{"post":{"summary":"Retry","operationId":"retry_api_v1_jobs__job_id__retry_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/{job_id}/result":{"get":{"summary":"Result","operationId":"result_api_v1_jobs__job_id__result_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/{job_id}/export/{fmt}":{"get":{"summary":"Export Result","operationId":"export_result_api_v1_jobs__job_id__export__fmt__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"fmt","in":"path","required":true,"schema":{"type":"string","title":"Fmt"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/{job_id}/pages/{page_no}/image":{"get":{"summary":"Page Image","operationId":"page_image_api_v1_jobs__job_id__pages__page_no__image_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"page_no","in":"path","required":true,"schema":{"type":"integer","title":"Page No"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/{job_id}/corrections":{"post":{"summary":"Correction","operationId":"correction_api_v1_jobs__job_id__corrections_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CorrectionIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/corrections/stats":{"get":{"summary":"Corrections Stats","operationId":"corrections_stats_api_v1_corrections_stats_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dictionary":{"get":{"summary":"Dict List","operationId":"dict_list_api_v1_dictionary_get","parameters":[{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Dict Add","operationId":"dict_add_api_v1_dictionary_post","parameters":[{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DictionaryIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/settings":{"get":{"summary":"Get Settings","operationId":"get_settings_api_v1_settings_get","parameters":[{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Put Settings","operationId":"put_settings_api_v1_settings_put","parameters":[{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeSettingsIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/clients":{"get":{"summary":"Integration Clients","operationId":"integration_clients_api_v1_integrations_clients_get","parameters":[{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Integration Client Create","operationId":"integration_client_create_api_v1_integrations_clients_post","parameters":[{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationClientCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/clients/{client_id}":{"put":{"summary":"Integration Client Update","operationId":"integration_client_update_api_v1_integrations_clients__client_id__put","parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationClientUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/clients/{client_id}/rotate-key":{"post":{"summary":"Integration Rotate Key","operationId":"integration_rotate_key_api_v1_integrations_clients__client_id__rotate_key_post","parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/clients/{client_id}/rotate-webhook-secret":{"post":{"summary":"Integration Rotate Webhook Secret","operationId":"integration_rotate_webhook_secret_api_v1_integrations_clients__client_id__rotate_webhook_secret_post","parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/clients/{client_id}/revoke":{"post":{"summary":"Integration Revoke","operationId":"integration_revoke_api_v1_integrations_clients__client_id__revoke_post","parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/clients/{client_id}/webhook/test":{"post":{"summary":"Integration Webhook Test","operationId":"integration_webhook_test_api_v1_integrations_clients__client_id__webhook_test_post","parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/webhooks":{"get":{"summary":"Integration Webhooks","operationId":"integration_webhooks_api_v1_integrations_webhooks_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"client_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"}},{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/audit":{"get":{"summary":"Integration Audit","operationId":"integration_audit_api_v1_integrations_audit_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Base64OCRIn":{"properties":{"filename":{"type":"string","maxLength":255,"minLength":1,"title":"Filename"},"content_base64":{"type":"string","minLength":1,"title":"Content Base64"},"mode":{"type":"string","enum":["auto","fast","accurate"],"title":"Mode","default":"auto"},"allow_external":{"type":"boolean","title":"Allow External","default":false},"force":{"type":"boolean","title":"Force","default":false},"client_job_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Client Job Id"},"correlation_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Correlation Id"},"callback":{"type":"boolean","title":"Callback","default":false},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","default":{}}},"type":"object","required":["filename","content_base64"],"title":"Base64OCRIn"},"Body_gateway_ocr_api_v1_gateway_ocr_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"allow_external":{"type":"boolean","title":"Allow External","default":false},"force":{"type":"boolean","title":"Force","default":false},"client_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Job Id"},"correlation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Correlation Id"},"metadata_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metadata Json"},"wait_seconds":{"type":"integer","title":"Wait Seconds","default":0}},"type":"object","required":["file"],"title":"Body_gateway_ocr_api_v1_gateway_ocr_post"},"Body_public_ocr_submit_ocr_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"mode":{"type":"string","title":"Mode","default":"auto"},"allow_external":{"type":"boolean","title":"Allow External","default":false},"force":{"type":"boolean","title":"Force","default":false},"wait_seconds":{"type":"integer","title":"Wait Seconds","default":0},"client_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Job Id"},"correlation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Correlation Id"},"metadata_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metadata Json"}},"type":"object","required":["file"],"title":"Body_public_ocr_submit_ocr_post"},"Body_recognize_sync_api_v1_recognize_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"mode":{"type":"string","title":"Mode","default":"auto"},"allow_external":{"type":"boolean","title":"Allow External","default":false},"force":{"type":"boolean","title":"Force","default":false},"client_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Job Id"},"correlation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Correlation Id"},"callback":{"type":"boolean","title":"Callback","default":false},"metadata_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metadata Json"},"timeout_seconds":{"type":"integer","title":"Timeout Seconds","default":30}},"type":"object","required":["file"],"title":"Body_recognize_sync_api_v1_recognize_post"},"Body_recognize_sync_simple_api_v1_recognize_simple_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"mode":{"type":"string","title":"Mode","default":"auto"},"allow_external":{"type":"boolean","title":"Allow External","default":false},"force":{"type":"boolean","title":"Force","default":false},"client_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Job Id"},"correlation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Correlation Id"},"metadata_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metadata Json"},"timeout_seconds":{"type":"integer","title":"Timeout Seconds","default":120}},"type":"object","required":["file"],"title":"Body_recognize_sync_simple_api_v1_recognize_simple_post"},"Body_submit_batch_api_v1_ocr_batch_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"},"mode":{"type":"string","title":"Mode","default":"auto"},"allow_external":{"type":"boolean","title":"Allow External","default":false},"force":{"type":"boolean","title":"Force","default":false},"callback":{"type":"boolean","title":"Callback","default":false},"correlation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Correlation Id"},"client_job_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Job Prefix"}},"type":"object","required":["files"],"title":"Body_submit_batch_api_v1_ocr_batch_post"},"Body_submit_ocr_api_v1_ocr_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"mode":{"type":"string","title":"Mode","default":"auto"},"allow_external":{"type":"boolean","title":"Allow External","default":false},"force":{"type":"boolean","title":"Force","default":false},"client_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Job Id"},"correlation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Correlation Id"},"callback":{"type":"boolean","title":"Callback","default":false},"metadata_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metadata Json"}},"type":"object","required":["file"],"title":"Body_submit_ocr_api_v1_ocr_post"},"CorrectionIn":{"properties":{"page_index":{"type":"integer","minimum":0.0,"title":"Page Index"},"block_index":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Block Index"},"original_text":{"type":"string","title":"Original Text"},"corrected_text":{"type":"string","title":"Corrected Text"},"bbox":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Bbox"}},"type":"object","required":["page_index","original_text","corrected_text"],"title":"CorrectionIn"},"DictionaryIn":{"properties":{"term":{"type":"string","maxLength":200,"minLength":1,"title":"Term"},"normalized":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Normalized"},"category":{"type":"string","maxLength":50,"title":"Category","default":"general"},"priority":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Priority","default":50}},"type":"object","required":["term"],"title":"DictionaryIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IntegrationClientCreate":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"scopes":{"items":{"type":"string","enum":["ocr:submit","ocr:read","ocr:correct","external:ocr"]},"type":"array","title":"Scopes","default":["ocr:submit","ocr:read"]},"allow_external":{"type":"boolean","title":"Allow External","default":false},"rate_limit_per_minute":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Rate Limit Per Minute","default":60},"webhook_url":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Webhook Url"},"webhook_events":{"items":{"type":"string","enum":["job.completed","job.failed"]},"type":"array","title":"Webhook Events","default":["job.completed","job.failed"]}},"type":"object","required":["name"],"title":"IntegrationClientCreate"},"IntegrationClientUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Name"},"scopes":{"anyOf":[{"items":{"type":"string","enum":["ocr:submit","ocr:read","ocr:correct","external:ocr"]},"type":"array"},{"type":"null"}],"title":"Scopes"},"allow_external":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow External"},"rate_limit_per_minute":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":1.0},{"type":"null"}],"title":"Rate Limit Per Minute"},"webhook_url":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Webhook Url"},"webhook_events":{"anyOf":[{"items":{"type":"string","enum":["job.completed","job.failed"]},"type":"array"},{"type":"null"}],"title":"Webhook Events"},"clear_webhook":{"type":"boolean","title":"Clear Webhook","default":false}},"type":"object","title":"IntegrationClientUpdate"},"RuntimeSettingsIn":{"properties":{"external_ocr_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"External Ocr Enabled"}},"type":"object","title":"RuntimeSettingsIn"},"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"}}}}