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
x-realizes-capability-ids:
- BC-610.60
x-capability-derivation:
method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
min_confidence: 0.7
sources:
- capability_id: BC-610.60
capability_name: Artificial Intelligence Management
spec: nanonets-ocr-predict-api-openapi.yml
confidence: 0.72
model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: fileAssignmentApi
url: ../openapi/nanonets-file-assignment-api-openapi.yml
type: openapi
- name: ocrPredictApi
url: ../openapi/nanonets-ocr-predict-api-openapi.yml
type: openapi
- name: ocrRetrieveApi
url: ../openapi/nanonets-ocr-retrieve-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
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.