Skip to main content
Use Nanonets through Corsair: one client, typed API calls. Create an API key at app.nanonets.com/#keys (Extract Data screen, Account Info, API Keys, “Add a New Key”); the first key is issued automatically at signup. The key is sent as HTTP Basic auth with the key as username and an empty password. Things to know before you call:
  • Predictions are writes. Every create call uploads a file to Nanonets and consumes API quota, so they are classified write, not read. Files are sent as base64_data (PNG or JPEG); the binary multipart file field is not wrapped.
  • async: true switches a create call to the documented async variant: the response comes back pending with a request_file_id, which you poll with predictions.getFileByFileId. Nanonets documents no done flag on that route: the file is processed once its pages are listed with their predicted_boxes, under unmoderated_images, or under moderated_images after the file is approved. Recommended above 3 pages; results normally finish within ~5 minutes.
  • Quota and rate limits. 402 means the free API call quota is exhausted and is never retried. 429 is per model per 1-minute window on the predict calls; the plugin waits the documented 30 seconds between retries (Retry-After is honored when sent), up to three times.
  • Paging is a day window. predictions.listFiles takes start_day_interval and current_batch_day as days since 1970-01-01 GMT (floor of unix seconds over 86400) and returns moderated and unmoderated images for that window; walk the windows forward yourself.
  • files.updateFields replaces the whole field set of one page. Read the page first (predictions.getFileByPageId or predictions.listFiles), then send its id with the full moderated_boxes array: unchanged boxes stay, new boxes need is_new: true, and any field you omit is deleted. Copy day_since_epoch and hour_of_day from the same read: they are required, because Nanonets looks the page up by them and answers 400 without them. page and is_moderated are optional. The request is sent as text/plain because that is the documented working sample.
  • Deleting is permanent. files.delete removes the file and its predictions for good. integrations.executeQuery runs arbitrary SQL against a connected store (documented examples include UPDATE), so it is also classified destructive.
  • Training. models.uploadTrainingUrls adds images by URL (pass data to label them: one entry per image with its filename URL and the boxes in object), then models.train retrains; the model state walks 2→3→4→5 (usable). models.updateGuidelines changes extraction behavior of Instant Learning models via natural-language instructions.
  • Webhooks. Nanonets can POST document events to URLs you configure in its UI (Workflow → Exports → Webhooks), but it signs nothing, so the plugin receives none.
What you get:
  • 17 typed API operations

Setup

1

Install

2

Add the plugin

corsair.ts
With multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.
3

Choose authentication

4

Connect a tenant

Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.

Example API calls

Fetch a prediction file by ID
Extract fields from an image URL
See the full list on the API page.

What’s next

API reference

Every nanonets.api.* operation with input and output types.

Connect / OAuth

createLink, Hub delivery, and tenant connect flows.

Use with agents

Expose this plugin’s operations as MCP tools.