Skip to main content
The published client is ndi-sdk on PyPI. It covers the same /v1 surface as this site. Requires Python 3.11+. Depends only on httpx and pydantic.
Mint a key on the API keys page in the NDI console, then:
NdiClient() reads $NDI_API_KEY and $NDI_BASE_URL. You can also pass api_key= / base_url= explicitly.

What you can do

One-shot calls on client.documents do not write to a workspace. Uploads for those calls are single-use: the bytes are dropped when the job that reads them finishes.

Parse a local file

wait_seconds holds the HTTP response open when the work finishes quickly. For everything else, poll:

Extract structured JSON

Pass a JSON Schema. Extract from an upload, or from a prior parse with ParseResultSource so the parse is not paid for twice. not_found on a field is an answer about the document, not an error.

Split and classify

split cuts a scanned packet into logical documents. classify labels one document against classes you define. Classify reads the original file, so it rejects a parse-result source.

Ground quoted text

Ground pins a quote back to a location in the source.

Search a workspace

A workspace is a durable corpus: upload files, ingest them once, then search and ask questions repeatedly. Uploading does not make a file searchable — ingestion does.
For a single file, client.upload_and_ingest(...) collapses the upload and ingest calls. Across several spreadsheets, client.tools.query_tables(...) answers one question over the set.

Async

Every method exists on AsyncNdiClient, awaited:
Both clients are context managers. If you pass your own http_client, you own closing it.

Next steps