arazzo: 1.0.1 info: title: Nanonets Predict and Assign Reviewer summary: Predict on a file, fetch the file-level result, and assign it to a reviewer. description: >- Routes a freshly extracted file into the human review queue. The workflow runs a synchronous OCR prediction on a file, retrieves the file-level inference to confirm the request_file_id, and assigns that file to a named team member by email for review. Every step spells out its request inline so the flow can be read and executed without opening the underlying OpenAPI description. version: 1.0.0 sourceDescriptions: - name: ocrApi url: ../openapi/nanonets-ocr-api-openapi.yml type: openapi - name: fileManagementApi url: ../openapi/nanonets-file-management-api-openapi.yml type: openapi workflows: - workflowId: predict-and-assign-reviewer summary: Predict on a file, confirm the inference, and assign it to a reviewer. description: >- Runs a sync prediction, fetches the file-level inference, and assigns the file to a team member for review. inputs: type: object required: - authorization - modelId - file - member properties: authorization: type: string description: HTTP Basic credential header value (Basic ). modelId: type: string description: Unique identifier for the Nanonets OCR model. file: type: string description: Binary contents of the document to run OCR against. member: type: string description: Email of the team member to assign the file to. steps: - stepId: predict description: Run a synchronous OCR prediction on the uploaded file. operationId: ocrModelLabelFileByModelIdPost parameters: - name: Authorization in: header value: $inputs.authorization - name: model_id in: path value: $inputs.modelId requestBody: contentType: multipart/form-data payload: file: $inputs.file successCriteria: - condition: $statusCode == 200 outputs: requestFileId: $response.body#/result/0/request_file_id - stepId: getPrediction description: Retrieve the file-level inference to confirm the request_file_id resolves. operationId: ocrModelGetPredictionFileByFileId parameters: - name: Authorization in: header value: $inputs.authorization - name: model_id in: path value: $inputs.modelId - name: request_file_id in: path value: $steps.predict.outputs.requestFileId successCriteria: - condition: $statusCode == 200 outputs: moderatedCount: $response.body#/moderated_images_count - stepId: assignReviewer description: Assign the file to the named team member for review. operationId: assignFiles parameters: - name: Authorization in: header value: $inputs.authorization - name: model_id in: path value: $inputs.modelId requestBody: contentType: application/json payload: member: $inputs.member file_ids: - $steps.predict.outputs.requestFileId successCriteria: - condition: $statusCode == 200 outputs: assignResponse: $response.body outputs: requestFileId: $steps.predict.outputs.requestFileId assignResponse: $steps.assignReviewer.outputs.assignResponse