openapi: 3.2.0 info: title: B2B-OldKAIExtract Process Zip API description: 'Extract structured information from documents. ## Using the API ### Optional Parameters When using the ''Try it out'' feature in Swagger UI, optional parameters with empty values can be left as-is. The API handles empty strings and will treat them as if the parameter was omitted. You don''t need to remove empty optional fields from requests. **Tip:** In generated curl commands, you may see flags like `-F ''tag=''` or `-F ''tools=''`. These empty optional fields are safe to include or remove - the API treats them identically.' version: 0.1.0 servers: - url: https://gateway.api.kuehne-nagel.com/oldkaiextractapi/0.1.0 - url: http://gateway.api.kuehne-nagel.com:8280/oldkaiextractapi/0.1.0 security: - default: [] tags: - name: process-zip description: Process ZIP archives containing multiple files using LLM extraction. paths: /v2/process-zip/: post: tags: - process-zip summary: Post Process Zip V2 operationId: post_process_zip_v2_v2_process_zip__post parameters: - name: x-api-key in: header required: false style: simple explode: false schema: anyOf: - type: string - type: 'null' title: X-Api-Key - name: x-auth-request-email in: header required: false style: simple explode: false schema: anyOf: - type: string - type: 'null' title: X-Auth-Request-Email requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/Body_post_process_zip_v2_v2_process_zip__post' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ExtractZipResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited /v2/async/process-zip/: post: tags: - process-zip summary: Post Process Zip Async V2 operationId: post_process_zip_async_v2_v2_async_process_zip__post parameters: - name: x-api-key in: header required: false style: simple explode: false schema: anyOf: - type: string - type: 'null' title: X-Api-Key - name: x-auth-request-email in: header required: false style: simple explode: false schema: anyOf: - type: string - type: 'null' title: X-Auth-Request-Email requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/Body_post_process_zip_async_v2_v2_async_process_zip__post' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ExtractAsyncResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited /v3/workspaces/{workspace_id}/process-zip: post: tags: - process-zip summary: Post Process Zip V3 description: 'Process a zip file using a specific prompt version and return extraction results for all contained documents.' operationId: post_process_zip_v3_v3_workspaces__workspace_id__process_zip_post parameters: - name: workspace_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Workspace Id - name: x-auth-request-email in: header required: true style: simple explode: false schema: type: string title: X-Auth-Request-Email requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/Body_post_process_zip_v3_v3_workspaces__workspace_id__process_zip_post' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ExtractZipResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited /v3/workspaces/{workspace_id}/process-zip-with-prompt: post: tags: - process-zip summary: Post Process Zip With Prompt V3 description: Process a zip file with a custom prompt string and return extraction results. operationId: post_process_zip_with_prompt_v3_v3_workspaces__workspace_id__process_zip_with_prompt_post parameters: - name: workspace_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Workspace Id - name: x-auth-request-email in: header required: true style: simple explode: false schema: type: string title: X-Auth-Request-Email requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/Body_post_process_zip_with_prompt_v3_v3_workspaces__workspace_id__process_zip_with_prompt_post' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ExtractZipResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited /v3/api-key-auth/workspaces/{workspace_id}/process-zip: post: tags: - process-zip summary: Post Process Zip V3 Api Key description: Process a zip file using API key authentication with a specific prompt version. operationId: post_process_zip_v3_api_key_v3_api_key_auth_workspaces__workspace_id__process_zip_post parameters: - name: workspace_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Workspace Id - name: x-api-key in: header required: true style: simple explode: false schema: type: string title: X-Api-Key requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/Body_post_process_zip_v3_api_key_v3_api_key_auth_workspaces__workspace_id__process_zip_post' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ExtractZipResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited /v3/api-key-auth/workspaces/{workspace_id}/process-zip-with-prompt: post: tags: - process-zip summary: Post Process Zip With Prompt V3 Api Key description: Process a zip file with a custom prompt string using API key authentication. operationId: post_process_zip_with_prompt_v3_api_key_v3_api_key_auth_workspaces__workspace_id__process_zip_with_prompt_post parameters: - name: workspace_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Workspace Id - name: x-api-key in: header required: true style: simple explode: false schema: type: string title: X-Api-Key requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/Body_post_process_zip_with_prompt_v3_api_key_v3_api_key_auth_workspaces__workspace_id__process_zip_with_prompt_post' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ExtractZipResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited /v3/api-key-auth/workspaces/{workspace_id}/async/process-zip: post: tags: - process-zip summary: Post Process Zip Async V3 Api Key description: 'Process a zip file asynchronously using API key authentication. When enable_mep_output is set to True, the API will send a notification to the MEP connector upon successful completion of the async processing job.' operationId: post_process_zip_async_v3_api_key_v3_api_key_auth_workspaces__workspace_id__async_process_zip_post parameters: - name: workspace_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Workspace Id - name: x-api-key in: header required: true style: simple explode: false schema: type: string title: X-Api-Key requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/Body_post_process_zip_async_v3_api_key_v3_api_key_auth_workspaces__workspace_id__async_process_zip_post' required: true responses: '202': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ExtractAsyncResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited /v3/workspaces/{workspace_id}/process-zip-base64: post: tags: - process-zip summary: Post Process Zip Base64 V3 description: Process a zip file from base64 content using a specific prompt version and return extraction results for all contained documents. operationId: post_process_zip_base64_v3_v3_workspaces__workspace_id__process_zip_base64_post parameters: - name: workspace_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Workspace Id - name: x-auth-request-email in: header required: true style: simple explode: false schema: type: string title: X-Auth-Request-Email requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Body_post_process_zip_base64_v3_v3_workspaces__workspace_id__process_zip_base64_post' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ExtractZipResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited /v3/workspaces/{workspace_id}/process-zip-with-prompt-base64: post: tags: - process-zip summary: Post Process Zip With Prompt Base64 V3 description: Process a zip file from base64 content with a custom prompt string and return extraction results. operationId: post_process_zip_with_prompt_base64_v3_v3_workspaces__workspace_id__process_zip_with_prompt_base64_post parameters: - name: workspace_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Workspace Id - name: x-auth-request-email in: header required: true style: simple explode: false schema: type: string title: X-Auth-Request-Email requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Body_post_process_zip_with_prompt_base64_v3_v3_workspaces__workspace_id__process_zip_with_prompt_base64_post' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ExtractZipResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited /v3/api-key-auth/workspaces/{workspace_id}/process-zip-base64: post: tags: - process-zip summary: Post Process Zip Base64 V3 Api Key description: Process a zip file from base64 content using API key authentication with a specific prompt version. operationId: post_process_zip_base64_v3_api_key_v3_api_key_auth_workspaces__workspace_id__process_zip_base64_post parameters: - name: workspace_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Workspace Id - name: x-api-key in: header required: true style: simple explode: false schema: type: string title: X-Api-Key requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Body_post_process_zip_base64_v3_api_key_v3_api_key_auth_workspaces__workspace_id__process_zip_base64_post' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ExtractZipResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited /v3/api-key-auth/workspaces/{workspace_id}/process-zip-with-prompt-base64: post: tags: - process-zip summary: Post Process Zip With Prompt Base64 V3 Api Key description: Process a base64 encoded zip file with a custom prompt string using API key authentication. operationId: post_process_zip_with_prompt_base64_v3_api_key_v3_api_key_auth_workspaces__workspace_id__process_zip_with_prompt_base64_post parameters: - name: workspace_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Workspace Id - name: x-api-key in: header required: true style: simple explode: false schema: type: string title: X-Api-Key requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Body_post_process_zip_with_prompt_base64_v3_api_key_v3_api_key_auth_workspaces__workspace_id__process_zip_with_prompt_base64_post' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ExtractZipResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited /v3/api-key-auth/workspaces/{workspace_id}/async/process-zip-base64: post: tags: - process-zip summary: Post Async Process Zip Base64 V3 Api Key description: Process a zip file from base64 content asynchronously using API key authentication with a specific prompt version. operationId: post_async_process_zip_base64_v3_api_key_v3_api_key_auth_workspaces__workspace_id__async_process_zip_base64_post parameters: - name: workspace_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Workspace Id - name: x-api-key in: header required: true style: simple explode: false schema: type: string title: X-Api-Key requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Body_post_async_process_zip_base64_v3_api_key_v3_api_key_auth_workspaces__workspace_id__async_process_zip_base64_post' required: true responses: '202': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ExtractAsyncResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited components: schemas: HTTPValidationError: type: object properties: detail: type: array items: $ref: '#/components/schemas/ValidationError' title: Detail title: HTTPValidationError Body_post_process_zip_v3_api_key_v3_api_key_auth_workspaces__workspace_id__process_zip_post: type: object properties: file: type: string format: binary description: ZIP archive with documents title: File prompt_id: type: string format: uuid description: The ID of the prompt to use for extraction. example: title: Prompt Id prompt_kwargs: anyOf: - type: string - type: 'null' description: Optional JSON string with template variables. Leave empty if not using template variables. example: '' title: Prompt Kwargs model_type: $ref: '#/components/schemas/ModelType' default: flash_25 description: 'The AI model to use. Default: flash_25.' example: flash_25 enforce_schema: type: boolean default: false description: 'Whether to strictly enforce output schema validation. Default: false.' example: false title: Enforce Schema output_schema: anyOf: - type: string - type: 'null' description: Optional JSON Schema for output validation. Overrides prompt schema. example: '{"type": "object", "properties": {"field1": {"type": "string"}}}' title: Output Schema tools: anyOf: - type: array items: type: string - type: 'null' description: Optional list of tool names. Leave empty if no tools should be used/available. example: [] title: Tools prompt_version_id: anyOf: - type: string - type: 'null' description: Optional specific prompt version ID. Leave empty for latest. example: '' title: Prompt Version Id tag: anyOf: - type: string - type: 'null' description: Optional tag to select prompt version. Leave empty for latest. example: '' title: Tag max_retries: type: integer default: 1 description: 'Max retry attempts (0-2). Default: 1.' example: 1 maximum: 2 minimum: 0 title: Max Retries convert_pdf_to_images: type: boolean default: false description: 'If true and the file is a PDF, convert each page to PNG images before LLM processing. This forces the LLM to use OCR capabilities for the entire page content, which can improve extraction quality for PDFs with incomplete or unreliable text layers. Default: false.' example: false title: Convert Pdf To Images required: - file - prompt_id title: Body_post_process_zip_v3_api_key_v3_api_key_auth_workspaces__workspace_id__process_zip_post ZipMetadata: type: object properties: total_files: type: integer title: Total Files processed_files: type: integer title: Processed Files errors: type: integer title: Errors started_at: type: string title: Started At completed_at: type: string title: Completed At processing_time_ms: anyOf: - type: integer - type: 'null' title: Processing Time Ms required: - completed_at - errors - processed_files - started_at - total_files title: ZipMetadata Body_post_process_zip_v2_v2_process_zip__post: type: object properties: workspace: type: string title: Workspace file: type: string format: binary title: File prompt_name: type: string title: Prompt Name prompt_kwargs: anyOf: - type: string - type: 'null' title: Prompt Kwargs model_type: $ref: '#/components/schemas/ModelType' default: flash_25 enforce_schema: type: boolean default: false title: Enforce Schema required: - file - prompt_name - workspace title: Body_post_process_zip_v2_v2_process_zip__post Body_post_process_zip_with_prompt_base64_v3_v3_workspaces__workspace_id__process_zip_with_prompt_base64_post: type: object properties: file_content: type: string description: Base64 encoded file content (PDF, DOCX, TXT, etc.) title: File Content filename: type: string description: Original filename with extension example: invoice.pdf title: Filename prompt: type: string description: The prompt text to use for extraction. Provide the full prompt instruction here instead of using a saved prompt ID. example: Extract all invoice data from the document... title: Prompt prompt_kwargs: anyOf: - type: string - type: 'null' description: 'Optional JSON string containing variables for prompt template substitution (e.g., ''{"company": "Acme Corp", "year": "2024"}''). Leave empty if not using template variables.' example: '' title: Prompt Kwargs model_type: $ref: '#/components/schemas/ModelType' default: flash_25 description: 'The AI model to use for extraction. Options: flash_25_lite (fast), flash_25 (more accurate), pro_25. Default: flash_25.' example: flash_25 output_schema: anyOf: - type: string - type: 'null' description: Optional JSON Schema to enforce on the extraction output. When provided, the API will validate extracted data against this schema. This takes precedence over any schema attached to the prompt version. Must be a valid JSON Schema (Draft 2020-12). Leave empty to use the prompt version's schema (if enforce_schema is true) or no schema. example: '{"type": "object", "properties": {"field1": {"type": "string"}}}' title: Output Schema tools: anyOf: - type: array items: type: string - type: 'null' description: Optional list of tool names to enable for this extraction (e.g., ['calculator', 'web_search']). Leave empty if no tools should be used/available. example: [] title: Tools convert_pdf_to_images: type: boolean default: false description: 'If true and the file is a PDF, convert each page to PNG images before LLM processing. This forces the LLM to use OCR capabilities for the entire page content, which can improve extraction quality for PDFs with incomplete or unreliable text layers. Default: false.' example: false title: Convert Pdf To Images required: - file_content - filename - prompt title: Body_post_process_zip_with_prompt_base64_v3_v3_workspaces__workspace_id__process_zip_with_prompt_base64_post Body_post_process_zip_async_v3_api_key_v3_api_key_auth_workspaces__workspace_id__async_process_zip_post: type: object properties: file: type: string format: binary description: ZIP archive to process asynchronously title: File prompt_id: type: string format: uuid description: The ID of the prompt to use for extraction. example: title: Prompt Id prompt_kwargs: anyOf: - type: string - type: 'null' description: Optional JSON string with template variables. Leave empty if not using template variables. example: '' title: Prompt Kwargs model_type: $ref: '#/components/schemas/ModelType' default: flash_25 description: 'The AI model to use. Default: flash_25.' example: flash_25 enforce_schema: type: boolean default: false description: 'Whether to strictly enforce output schema validation. Default: false.' example: false title: Enforce Schema output_schema: anyOf: - type: string - type: 'null' description: Optional JSON Schema for output validation. Overrides prompt schema. example: '{"type": "object", "properties": {"field1": {"type": "string"}}}' title: Output Schema tools: anyOf: - type: array items: type: string - type: 'null' description: Optional list of tool names. Leave empty if no tools should be used/available. example: [] title: Tools prompt_version_id: anyOf: - type: string - type: 'null' description: Optional specific prompt version ID. Leave empty for latest. example: '' title: Prompt Version Id tag: anyOf: - type: string - type: 'null' description: Optional tag to select prompt version. Leave empty for latest. example: '' title: Tag max_retries: type: integer default: 1 description: 'Max retry attempts (0-2). Default: 1.' example: 1 maximum: 2 minimum: 0 title: Max Retries enable_mep_output: type: boolean default: false description: 'Enable MEP connector notification. Default: false.' example: false title: Enable Mep Output convert_pdf_to_images: type: boolean default: false description: 'Convert PDF pages to PNG images for LLM processing. Default: false.' example: false title: Convert Pdf To Images required: - file - prompt_id title: Body_post_process_zip_async_v3_api_key_v3_api_key_auth_workspaces__workspace_id__async_process_zip_post ExtractAsyncResponse: type: object properties: tracking_id: type: string format: uuid title: Tracking Id status: type: string title: Status required: - status - tracking_id title: ExtractAsyncResponse Body_post_process_zip_async_v2_v2_async_process_zip__post: type: object properties: workspace: type: string title: Workspace file: type: string format: binary title: File prompt_name: type: string title: Prompt Name prompt_kwargs: anyOf: - type: string - type: 'null' title: Prompt Kwargs model_type: $ref: '#/components/schemas/ModelType' default: flash_25 enforce_schema: type: boolean default: false title: Enforce Schema required: - file - prompt_name - workspace title: Body_post_process_zip_async_v2_v2_async_process_zip__post ModelType: type: string enum: - flash_25_lite - flash_25_low - flash_25 - flash_3 - flash_35 - pro_25 - pro_31 - claude_haiku_45 - claude_sonnet_46 - claude_sonnet_46_low - claude_opus_46 - claude_opus_46_low - nova_2_lite - nova_2_pro_preview - nova_2_pro_preview_low title: ModelType Body_post_process_zip_with_prompt_v3_api_key_v3_api_key_auth_workspaces__workspace_id__process_zip_with_prompt_post: type: object properties: file: type: string format: binary description: ZIP archive containing documents to process title: File prompt: type: string description: Prompt text for extraction example: Extract all invoice data from the document... title: Prompt prompt_kwargs: anyOf: - type: string - type: 'null' description: Optional JSON string with template variables. Leave empty if not using template variables. example: '' title: Prompt Kwargs model_type: $ref: '#/components/schemas/ModelType' default: flash_25 description: 'The AI model to use. Default: flash_25.' example: flash_25 output_schema: anyOf: - type: string - type: 'null' description: Optional JSON Schema for output validation. Overrides prompt schema. example: '{"type": "object", "properties": {"field1": {"type": "string"}}}' title: Output Schema tools: anyOf: - type: array items: type: string - type: 'null' description: Optional list of tool names. Leave empty if no tools should be used/available. example: [] title: Tools convert_pdf_to_images: type: boolean default: false description: 'If true and the file is a PDF, convert each page to PNG images before LLM processing. This forces the LLM to use OCR capabilities for the entire page content, which can improve extraction quality for PDFs with incomplete or unreliable text layers. Default: false.' example: false title: Convert Pdf To Images required: - file - prompt title: Body_post_process_zip_with_prompt_v3_api_key_v3_api_key_auth_workspaces__workspace_id__process_zip_with_prompt_post FileMetadata: type: object properties: uuid: anyOf: - type: string - type: 'null' title: Uuid request_id: anyOf: - type: string - type: 'null' title: Request Id model_type: $ref: '#/components/schemas/ModelType' input_tokens: type: integer title: Input Tokens output_tokens: type: integer title: Output Tokens thinking_tokens: anyOf: - type: integer - type: 'null' title: Thinking Tokens token_costs: type: number title: Token Costs processed_at: type: string title: Processed At finish_reason: anyOf: - type: string - type: 'null' title: Finish Reason finish_message: anyOf: - type: string - type: 'null' title: Finish Message tool_calls: type: array default: [] items: type: string title: Tool Calls processing_time_ms: anyOf: - type: integer - type: 'null' title: Processing Time Ms required: - input_tokens - model_type - output_tokens - processed_at - token_costs title: FileMetadata Body_post_process_zip_v3_v3_workspaces__workspace_id__process_zip_post: type: object properties: file: type: string format: binary description: ZIP archive containing documents to process title: File prompt_id: type: string format: uuid description: The ID of the prompt to use for extraction. example: title: Prompt Id prompt_kwargs: anyOf: - type: string - type: 'null' description: Optional JSON string with template variables. Leave empty if not using template variables. example: '' title: Prompt Kwargs model_type: $ref: '#/components/schemas/ModelType' default: flash_25 description: 'The AI model to use. Default: flash_25.' example: flash_25 enforce_schema: type: boolean default: false description: 'Whether to strictly enforce output schema validation. Default: false.' example: false title: Enforce Schema output_schema: anyOf: - type: string - type: 'null' description: Optional JSON Schema for output validation. Overrides prompt schema. example: '{"type": "object", "properties": {"field1": {"type": "string"}}}' title: Output Schema tools: anyOf: - type: array items: type: string - type: 'null' description: Optional list of tool names. Leave empty if no tools should be used/available. example: [] title: Tools prompt_version_id: anyOf: - type: string - type: 'null' description: Optional specific prompt version ID. Leave empty for latest. example: '' title: Prompt Version Id tag: anyOf: - type: string - type: 'null' description: Optional tag to select prompt version. Leave empty for latest. example: '' title: Tag max_retries: type: integer default: 1 description: 'Max retry attempts (0-2). Default: 1.' example: 1 maximum: 2 minimum: 0 title: Max Retries convert_pdf_to_images: type: boolean default: false description: 'If true and the file is a PDF, convert each page to PNG images before LLM processing. This forces the LLM to use OCR capabilities for the entire page content, which can improve extraction quality for PDFs with incomplete or unreliable text layers. Default: false.' example: false title: Convert Pdf To Images required: - file - prompt_id title: Body_post_process_zip_v3_v3_workspaces__workspace_id__process_zip_post ExtractZipResponse: type: object properties: results: anyOf: - type: array items: $ref: '#/components/schemas/ExtractZipFileResult' - type: 'null' title: Results metadata: anyOf: - $ref: '#/components/schemas/ZipMetadata' - type: 'null' error: anyOf: - type: string - type: 'null' title: Error title: ExtractZipResponse ExtractZipFileResult: type: object properties: filename: anyOf: - type: string - type: 'null' title: Filename result: $ref: '#/components/schemas/ExtractZipResult' required: - result title: ExtractZipFileResult Body_post_async_process_zip_base64_v3_api_key_v3_api_key_auth_workspaces__workspace_id__async_process_zip_base64_post: type: object properties: file_content: type: string description: Base64 encoded file content title: File Content filename: type: string description: Original filename with extension example: document.pdf title: Filename prompt_id: type: string format: uuid description: The ID of the prompt to use for extraction. example: title: Prompt Id prompt_kwargs: anyOf: - type: string - type: 'null' description: Optional JSON string with template variables. Leave empty if not using template variables. example: '' title: Prompt Kwargs model_type: $ref: '#/components/schemas/ModelType' default: flash_25 description: 'The AI model to use. Default: flash_25.' example: flash_25 enforce_schema: type: boolean default: false description: 'Whether to strictly enforce output schema validation. Default: false.' example: false title: Enforce Schema output_schema: anyOf: - type: string - type: 'null' description: Optional JSON Schema for output validation. Overrides prompt schema. example: '{"type": "object", "properties": {"field1": {"type": "string"}}}' title: Output Schema tools: anyOf: - type: array items: type: string - type: 'null' description: Optional list of tool names. Leave empty if no tools should be used/available. example: [] title: Tools prompt_version_id: anyOf: - type: string - type: 'null' description: Optional specific prompt version ID. Leave empty for latest. example: '' title: Prompt Version Id tag: anyOf: - type: string - type: 'null' description: Optional tag to select prompt version. Leave empty for latest. example: '' title: Tag max_retries: type: integer default: 1 description: 'Max retry attempts (0-2). Default: 1.' example: 1 maximum: 2 minimum: 0 title: Max Retries enable_mep_output: type: boolean default: false description: 'Enable MEP connector notification. Default: false.' example: false title: Enable Mep Output convert_pdf_to_images: type: boolean default: false description: 'Convert PDF pages to PNG images for LLM processing. Default: false.' example: false title: Convert Pdf To Images required: - file_content - filename - prompt_id title: Body_post_async_process_zip_base64_v3_api_key_v3_api_key_auth_workspaces__workspace_id__async_process_zip_base64_post Body_post_process_zip_base64_v3_api_key_v3_api_key_auth_workspaces__workspace_id__process_zip_base64_post: type: object properties: file_content: type: string description: Base64 encoded file content title: File Content filename: type: string description: Original filename with extension example: document.pdf title: Filename prompt_id: type: string format: uuid description: The ID of the prompt to use for extraction. example: title: Prompt Id prompt_kwargs: anyOf: - type: string - type: 'null' description: Optional JSON string with template variables. Leave empty if not using template variables. example: '' title: Prompt Kwargs model_type: $ref: '#/components/schemas/ModelType' default: flash_25 description: 'The AI model to use. Default: flash_25.' example: flash_25 enforce_schema: type: boolean default: false description: 'Whether to strictly enforce output schema validation. Default: false.' example: false title: Enforce Schema output_schema: anyOf: - type: string - type: 'null' description: Optional JSON Schema for output validation. Overrides prompt schema. example: '{"type": "object", "properties": {"field1": {"type": "string"}}}' title: Output Schema tools: anyOf: - type: array items: type: string - type: 'null' description: Optional list of tool names. Leave empty if no tools should be used/available. example: [] title: Tools prompt_version_id: anyOf: - type: string - type: 'null' description: Optional specific prompt version ID. Leave empty for latest. example: '' title: Prompt Version Id tag: anyOf: - type: string - type: 'null' description: Optional tag to select prompt version. Leave empty for latest. example: '' title: Tag max_retries: type: integer default: 1 description: 'Max retry attempts (0-2). Default: 1.' example: 1 maximum: 2 minimum: 0 title: Max Retries convert_pdf_to_images: type: boolean default: false description: 'Convert PDF pages to PNG images for LLM processing. Default: false.' example: false title: Convert Pdf To Images required: - file_content - filename - prompt_id title: Body_post_process_zip_base64_v3_api_key_v3_api_key_auth_workspaces__workspace_id__process_zip_base64_post Body_post_process_zip_with_prompt_v3_v3_workspaces__workspace_id__process_zip_with_prompt_post: type: object properties: file: type: string format: binary description: ZIP archive containing documents to process title: File prompt: type: string description: Prompt text for extraction example: Extract all invoice data from the document... title: Prompt prompt_kwargs: anyOf: - type: string - type: 'null' description: Optional JSON string with template variables. Leave empty if not using template variables. example: '' title: Prompt Kwargs model_type: $ref: '#/components/schemas/ModelType' default: flash_25 description: 'The AI model to use. Default: flash_25.' example: flash_25 output_schema: anyOf: - type: string - type: 'null' description: Optional JSON Schema for output validation. Overrides prompt schema. example: '{"type": "object", "properties": {"field1": {"type": "string"}}}' title: Output Schema tools: anyOf: - type: array items: type: string - type: 'null' description: Optional list of tool names. Leave empty if no tools should be used/available. example: [] title: Tools convert_pdf_to_images: type: boolean default: false description: 'If true and the file is a PDF, convert each page to PNG images before LLM processing. This forces the LLM to use OCR capabilities for the entire page content, which can improve extraction quality for PDFs with incomplete or unreliable text layers. Default: false.' example: false title: Convert Pdf To Images required: - file - prompt title: Body_post_process_zip_with_prompt_v3_v3_workspaces__workspace_id__process_zip_with_prompt_post ExtractZipResult: type: object properties: data: anyOf: - {} - type: 'null' title: Data metadata: anyOf: - $ref: '#/components/schemas/FileMetadata' - type: 'null' error: anyOf: - type: string - type: 'null' title: Error title: ExtractZipResult Body_post_process_zip_base64_v3_v3_workspaces__workspace_id__process_zip_base64_post: type: object properties: file_content: type: string description: Base64 encoded file content (PDF, DOCX, TXT, etc.) title: File Content filename: type: string description: Original filename with extension example: invoice.pdf title: Filename prompt_id: type: string format: uuid description: The ID of the prompt to use for extraction. Use /workspaces/{workspace_id}/prompts to list available prompts. example: title: Prompt Id prompt_kwargs: anyOf: - type: string - type: 'null' description: 'Optional JSON string containing variables for prompt template substitution (e.g., ''{"company": "Acme Corp", "year": "2024"}''). Leave empty if not using template variables.' example: '' title: Prompt Kwargs model_type: $ref: '#/components/schemas/ModelType' default: flash_25 description: 'The AI model to use for extraction. Options: flash_25_lite (fast), flash_25 (more accurate), pro_25. Default: flash_25.' example: flash_25 enforce_schema: type: boolean default: false description: 'Whether to strictly enforce the output schema. When true, the API will validate extracted data against the schema. Default: false.' example: false title: Enforce Schema output_schema: anyOf: - type: string - type: 'null' description: Optional JSON Schema to enforce on the extraction output. When provided, the API will validate extracted data against this schema. This takes precedence over any schema attached to the prompt version. Must be a valid JSON Schema (Draft 2020-12). Leave empty to use the prompt version's schema (if enforce_schema is true) or no schema. example: '{"type": "object", "properties": {"field1": {"type": "string"}}}' title: Output Schema tools: anyOf: - type: array items: type: string - type: 'null' description: Optional list of tool names to enable for this extraction (e.g., ['calculator', 'web_search']). Leave empty if no tools should be used/available. example: [] title: Tools prompt_version_id: anyOf: - type: string - type: 'null' description: Optional specific version ID of the prompt to use. Leave empty to automatically use the latest version or version matching the tag. example: '' title: Prompt Version Id tag: anyOf: - type: string - type: 'null' description: Optional tag to select a specific prompt version (e.g., 'production', 'staging'). Leave empty to use the latest version. example: '' title: Tag max_retries: type: integer default: 1 description: 'Maximum number of retry attempts if extraction fails (0-2). Default: 1.' example: 1 maximum: 2 minimum: 0 title: Max Retries convert_pdf_to_images: type: boolean default: false description: 'If true and the file is a PDF, convert each page to PNG images before LLM processing. This forces the LLM to use OCR capabilities for the entire page content, which can improve extraction quality for PDFs with incomplete or unreliable text layers. Default: false.' example: false title: Convert Pdf To Images required: - file_content - filename - prompt_id title: Body_post_process_zip_base64_v3_v3_workspaces__workspace_id__process_zip_base64_post ? Body_post_process_zip_with_prompt_base64_v3_api_key_v3_api_key_auth_workspaces__workspace_id__process_zip_with_prompt_base64_post : type: object properties: file_content: type: string description: Base64 encoded file content title: File Content filename: type: string description: Original filename with extension example: document.pdf title: Filename prompt: type: string description: Prompt text for extraction example: Extract all invoice data from the document... title: Prompt prompt_kwargs: anyOf: - type: string - type: 'null' description: Optional JSON string with template variables. Leave empty if not using template variables. example: '' title: Prompt Kwargs model_type: $ref: '#/components/schemas/ModelType' default: flash_25 description: 'The AI model to use. Default: flash_25.' example: flash_25 output_schema: anyOf: - type: string - type: 'null' description: Optional JSON Schema for output validation. Overrides prompt schema. example: '{"type": "object", "properties": {"field1": {"type": "string"}}}' title: Output Schema tools: anyOf: - type: array items: type: string - type: 'null' description: Optional list of tool names. Leave empty if no tools should be used/available. example: [] title: Tools convert_pdf_to_images: type: boolean default: false description: 'Convert PDF pages to PNG images for LLM processing. Default: false.' example: false title: Convert Pdf To Images required: - file_content - filename - prompt title: Body_post_process_zip_with_prompt_base64_v3_api_key_v3_api_key_auth_workspaces__workspace_id__process_zip_with_prompt_base64_post ValidationError: type: object properties: loc: type: array items: anyOf: - type: string - type: integer title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context required: - loc - msg - type title: ValidationError securitySchemes: default: type: oauth2 flows: implicit: authorizationUrl: https://gateway.api.kuehne-nagel.com/authorize scopes: {} x-wso2-api-key-header: ApiKey