For Agents
Train custom OCR and image classification models on uploaded examples, then run predictions on new images so an agent can extract structured fields from documents.
Install Jentic One Beta
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the NanoNets, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.
Two steps, two machines. Install the instance in a safe environment, then register your agent from wherever it runs.
Step 1: Jentic One Host machine
# On the machine that will host your Jentic One instance:
curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | shStep 2: Agent machine
# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | sh
jentic register # connects your agent to your Jentic One instanceJentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.
What an agent can do with NanoNets API.
Create an OCR or image classification model via /OCR/Model or /ImageCategorization/Model
Upload training files or remote URLs to a model with /UploadFile and /UploadUrls
Label training examples through /LabelFile and /LabelUrls before training
GET STARTED
Use for: I need to train a custom OCR model on invoice samples, Extract structured fields from a scanned document, Run full-text OCR on an uploaded image, Check whether a NanoNets model has finished training
Not supported: Does not handle natural-language generation, text translation, or speech transcription — use for image classification and OCR model training and inference only.
The NanoNets API lets developers build, train, and run custom deep-learning models for image classification and OCR without managing infrastructure. Operations cover creating a model, uploading and labelling training files or URLs, kicking off training, and submitting prediction requests on hosted models. Models progress through state IDs from creation through training to hosted (state 5), where they accept inference traffic.
Trigger model training and poll the model state until it reaches hosted (5)
Run OCR predictions against a hosted model to extract structured fields
Pull full-text OCR from images via /OCR/FullText without training a custom model
Retrieve image-level inferences within a date interval for audit and accuracy tracking
Patterns agents use NanoNets API for, with concrete tasks.
★ Custom Invoice OCR Pipeline
Train a NanoNets OCR model on a few hundred labelled invoices, then route incoming PDFs through the hosted model to extract vendor name, total, line items, and dates as structured JSON. The full lifecycle is covered: POST /OCR/Model creates the model, /OCR/Model/{id}/UploadFile uploads training images, /LabelFile attaches annotations, /Train kicks off training, and predictions run once state reaches 5.
Create an OCR model via POST /OCR/Model, upload 200 labelled invoice files via /UploadFile and /LabelFile, trigger /Train, poll until state=5, then call prediction on a new invoice
Receipt Image Classification
Build an image classification model that sorts receipt photos into categories (meals, travel, supplies) using POST /ImageCategorization/Model and the upload/label/train flow. Once hosted, the model classifies new receipt uploads in production for expense automation, removing the per-receipt manual category step.
Create classification model via POST /ImageCategorization/Model, upload labelled receipt images grouped by category, train the model, and call predict on new receipts
Document Full-Text Extraction
Skip custom training and use the pre-built /OCR/FullText endpoint to pull all visible text from an image or PDF. This suits agents that need free-form document content for downstream summarisation or RAG, where field-level extraction is not required and a generic OCR call is sufficient.
POST an image to /OCR/FullText and feed the returned text into a downstream summarisation or embedding step
Agent-Driven Document Processing
Let an AI agent orchestrate document intake by searching Jentic for 'extract fields from a document', loading the NanoNets prediction operation schema, and calling it with the image URL. The agent never holds the basic-auth credentials and can swap to alternative OCR providers if NanoNets returns low confidence.
Search Jentic for 'extract fields from a document', load the OCR prediction schema, execute against the user's uploaded file, and inspect confidence scores
20 endpoints — the nanonets api lets developers build, train, and run custom deep-learning models for image classification and ocr without managing infrastructure.
METHOD
PATH
DESCRIPTION
/OCR/Model
Create an OCR model
/OCR/Model/{model_id}
Fetch model state and metadata
/OCR/Model/{model_id}/UploadFile
Upload training file to a model
/OCR/Model/{model_id}/LabelFile
Attach labels to a training file
/OCR/Model/{model_id}/Train
Start training the model
/OCR/FullText
Run full-text OCR without a custom model
/ImageCategorization/Model
Create an image classification model
/OCR/Model
Create an OCR model
/OCR/Model/{model_id}
Fetch model state and metadata
/OCR/Model/{model_id}/UploadFile
Upload training file to a model
/OCR/Model/{model_id}/LabelFile
Attach labels to a training file
/OCR/Model/{model_id}/Train
Start training the model
Three things that make agents converge on Jentic-routed access.
Credential isolation
NanoNets uses HTTP basic auth with your API key. Through Jentic the API key is stored encrypted in the vault (MAXsystem) — agents call operations through scoped tokens and never see the raw key in their context.
Intent-based discovery
Agents search by intent (e.g. 'extract fields from a document' or 'train an OCR model') and Jentic returns the matching NanoNets operations with input schemas, so the agent calls the right endpoint without reading the model state machine in the docs.
Time to first call
Direct NanoNets integration: 2-4 days for auth, training pipeline, and state polling. Through Jentic: under 1 hour for prediction calls; training pipelines remain workflow-shaped but each step is callable directly.
Alternatives and complements available in the Jentic catalogue.
Specific to using NanoNets API through Jentic.
What authentication does the NanoNets API use?
HTTP basic authentication using your NanoNets API key as the username (password left empty). Through Jentic the API key is stored encrypted in the vault (MAXsystem) and never enters agent context.
Can I train a custom OCR model with this API?
Yes. POST /OCR/Model creates a model, /OCR/Model/{id}/UploadFile and /LabelFile attach training data, and POST /OCR/Model/{model_id}/Train starts training. Poll /OCR/Model/{model_id} until state=5 (hosted) before sending prediction traffic.
What are the rate limits for the NanoNets API?
The OpenAPI spec does not publish per-second rate limits. Limits are governed by your NanoNets plan tier and applied at the inference and training-throughput level — check the NanoNets pricing page for your account's quota before high-volume runs.
How do I run document OCR through Jentic?
Run pip install jentic, then search 'extract fields from a document'. Jentic returns the relevant /OCR/Model prediction operation or /OCR/FullText with input schemas — load the schema, send the image URL or file, and execute.
What model states should I expect during training?
Models progress through numeric states: 0 created (no training data), 1 data uploaded (needs annotation), 2 annotated (ready to train), 3 in training queue, 4 currently training, 5 hosted (ready for prediction), 6 retraining with new data. State -1 indicates a training error.
Do I need a custom model for simple text extraction?
No. /OCR/FullText returns all visible text from an image or PDF without training. Use a custom /OCR/Model only when you need structured fields (invoice number, total, line items) rather than raw text.
/OCR/FullText
Run full-text OCR without a custom model
/ImageCategorization/Model
Create an image classification model