# Nanonets — how to use (mcp.ai)

Connect your Nanonets account and use 11 tools for document data extraction straight from your AI agent. Connect with your own API key. Nanonets provides an AI-driven Intelligent Document Processing API that transforms unstructured documents into structured data, enabling efficient data extraction and workflow automation.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_nano_nets?ms=1787295960000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `nano_nets_create_model`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/nano_nets`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/nano_nets/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/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 id
  - body: { categories: string[] }
- `POST https://api.mcp.ai/api/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 trai
  - body: { model_id: string }
- `POST https://api.mcp.ai/api/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 avail
- `POST https://api.mcp.ai/api/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 te
  - body: { page?: integer, model_id: string, page_size?: integer }
- `POST https://api.mcp.ai/api/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.
  - body: { model_id: string }
- `POST https://api.mcp.ai/api/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.
  - body: { page?: integer, model_id: string, page_size?: integer }
- `POST https://api.mcp.ai/api/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.
- `POST https://api.mcp.ai/api/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 mon
  - body: { page?: integer, limit?: integer, workflow_id: string }
- `POST https://api.mcp.ai/api/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 behavi
  - body: { model_id: string, field_instructions: string, table_instructions: string }
- `POST https://api.mcp.ai/api/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.
  - body: { file: object, model_id: string }
- `POST https://api.mcp.ai/api/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.
  - body: { urls: string[], model_id: string }

## Example prompts
- "What can I do in Nanonets?"
- "Show me a summary of my Nanonets account"

## More
- Page: https://mcp.ai/nano_nets
- Agent spec (llms.txt): https://mcp.ai/nano_nets/llms.txt
- Postman collection: https://mcp.ai/nano_nets/postman.json
