Nanonets · Arazzo Workflow

Nanonets Predict and Assign Reviewer

Version 1.0.0

Predict on a file, fetch the file-level result, and assign it to a reviewer.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub AIArtificial IntelligenceOCRDocument AIIntelligent Document ProcessingData ExtractionWorkflow AutomationComputer VisionNo-CodeArazzoWorkflows

Provider

nanonets

Workflows

predict-and-assign-reviewer
Predict on a file, confirm the inference, and assign it to a reviewer.
Runs a sync prediction, fetches the file-level inference, and assigns the file to a team member for review.
3 steps inputs: authorization, file, member, modelId outputs: assignResponse, requestFileId
1
predict
ocrModelLabelFileByModelIdPost
Run a synchronous OCR prediction on the uploaded file.
2
getPrediction
ocrModelGetPredictionFileByFileId
Retrieve the file-level inference to confirm the request_file_id resolves.
3
assignReviewer
assignFiles
Assign the file to the named team member for review.

Source API Descriptions

Arazzo Workflow Specification

nanonets-predict-and-assign-reviewer-workflow.yml Raw ↑
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 <base64 of apiKey:>).
      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