# Nanonets

Nanonets provides an AI-driven Intelligent Document Processing API that transforms unstructured documents into structured data, enabling efficient data extraction and workflow automation.

- **Category:** ai document extraction
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 11
- **Triggers:** 0
- **Slug:** `NANO_NETS`
- **Version:** 20260307_00

## Tools

### Create Model

**Slug:** `NANO_NETS_CREATE_MODEL`

Tool to create a new image classification or OCR model. Use when you need to initialize a model before uploading training images. Provide a list of categories/classes that the model should learn to identify or extract.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `categories` | array | Yes | List of category/class names for the model to identify. For image classification, provide labels like ['cat', 'dog']. For OCR extraction, provide field names to extract like ['invoice_number', 'date', 'total']. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete OCR Model

**Slug:** `NANO_NETS_DELETE_MODEL`

Permanently deletes an OCR model from Nanonets. Use this action when you need to remove a trained model that is no longer needed. This action is irreversible - once deleted, the model and all its training data cannot be recovered. Prerequisites: Obtain the model_id from the 'Get all OCR models' action first.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model_id` | string | Yes | The unique identifier (UUID) of the OCR model to delete. Get this from the 'Get all OCR models' action. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get All Models

**Slug:** `NANO_NETS_GET_ALL_MODELS`

Retrieves all models (OCR and Image Classification) in the user's NanoNets account. Returns model details including ID, type, status, accuracy, and extractable fields/categories. Use to discover available models before performing predictions or training operations.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get All Prediction Files

**Slug:** `NANO_NETS_GET_ALL_PREDICTION_FILES`

Retrieve all prediction files (OCR results) for a NanoNets model. Use this tool to: - List all documents/images that have been processed by an OCR model - Get prediction results including extracted text and field values - Access file URLs and processing status for each prediction The response includes prediction labels with extracted text, confidence scores, and bounding box coordinates for each processed file.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | Page number for pagination (must be >= 1) |
| `model_id` | string | Yes | Unique identifier of the NanoNets OCR model to fetch prediction files from |
| `page_size` | integer | No | Number of prediction files per page (1-500) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get OCR Model Details

**Slug:** `NANO_NETS_GET_MODEL_DETAILS`

Tool to retrieve details of an OCR model. Use when you need full metadata of a model by its ID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model_id` | string | Yes | Unique identifier of the OCR model to retrieve details. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get OCR Training Images

**Slug:** `NANO_NETS_GET_TRAINING_IMAGES`

Tool to retrieve training images for an OCR model. Use when you need to page through images associated with a model before training or analysis.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | Page number for pagination (1-indexed). Defaults to 1. |
| `model_id` | string | Yes | Unique identifier (UUID) of the OCR model. Obtain this from the GET_ALL_MODELS action or model creation response. |
| `page_size` | integer | No | Number of images to return per page. Defaults to 50. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Workflows

**Slug:** `NANO_NETS_GET_WORKFLOWS`

Tool to retrieve a list of all workflows in your Nanonets account. Use when you need to inventory or inspect all configured workflows.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Workflow Documents

**Slug:** `NANO_NETS_LIST_DOCUMENTS`

Retrieve a paginated list of documents processed by a NanoNets workflow. Returns document metadata including processing status, upload timestamp, verification status, and page details. Use this to monitor document processing progress or access extracted data from previously uploaded documents.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | Page number for pagination (1-indexed). Defaults to 1 if not specified. |
| `limit` | integer | No | Number of documents per page. Defaults to 50 if not specified. |
| `workflow_id` | string | Yes | The unique identifier (UUID) for the NanoNets workflow. Obtain this from the GET_WORKFLOWS action or from the NanoNets dashboard. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Model AI Guidelines

**Slug:** `NANO_NETS_UPDATE_MODEL`

Update AI Agent guidelines for an OCR model. Sets instructions for how the AI should handle field and table predictions. Only works for Instant Learning models. Use this to customize extraction behavior for specific document types.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model_id` | string | Yes | Unique identifier of the OCR model to update AI guidelines for. |
| `field_instructions` | string | Yes | Instructions for the AI model to follow during field predictions. Provide guidance on how to extract and validate field data. |
| `table_instructions` | string | Yes | Instructions for the AI model to follow during table predictions. Provide guidance on how to identify and extract tabular data. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Upload Training Images by File

**Slug:** `NANO_NETS_UPLOAD_TRAINING_IMAGES_BY_FILE`

Tool to upload a training image file to a specified OCR model. Use when adding a local image file to train the model. Supported file formats include PNG, JPEG, and PDF.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `file` | object | Yes | The image file to upload for training. Supported formats: PNG, JPEG, PDF. |
| `model_id` | string | Yes | Unique identifier of the OCR model to which the image will be uploaded. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Upload Training Images by URL

**Slug:** `NANO_NETS_UPLOAD_TRAINING_IMAGES_BY_URL`

Tool to upload training images by URL to a specified OCR model. Use when adding URLs of images to a model for training purposes.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `urls` | array | Yes | List of publicly accessible image URLs to upload for training. |
| `model_id` | string | Yes | Unique identifier of the OCR model to which the images will be uploaded. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
