Find a file’s exact path, see what is inside it, and ask questions about it
These tools read ingested workspace files. Ingest a file before you use them.
Tool answers report credits billed for this call. Treat null as an unknown
amount; older stored answers can lack a billing receipt. Low-level job-backed tools
normally cost one credit; repeating a run-sql result that an earlier job already
paid for costs zero with waiver: "repeat_of_job". duplicate alone does not
guarantee a waiver: a result stored by a cancelled or failed job may still be
billable. QA tools report their settled job’s credits, which can vary with the
work performed. Re-serving a settled tool answer with the same Idempotency-Key
reports credits: 0 and waiver: "repeat_of_job", with the response header
Idempotent-Replayed: true. A retry after a transient failure can re-execute
the tool and is billed when it succeeds; that fresh execution has no replay header.
A job returned with Prefer: respond-async uses the
job billing contract instead.A typical agent loop:
Find the file.Folder metadata lists a folder and
finds files by name. Search results also name files (source_path).
See what is inside.File metadata describes one file:
its category, a summary, and its sections or tabs with their own summaries
and key terms.
Ask.QA file answers a question about one file;
query tables computes across spreadsheets.
To filter files by type and extracted field (every invoice to one customer,
every contract that expires this year), query the catalog.When you know what you need but not which file holds it, locate
names the pages and table tabs to read; read file reads them and
run SQL computes over the tables — the loop NDI’s own search agent
runs.Folder metadata, catalog, locate, read file and run SQL have no SDK or MCP
method. Call them with the ndi CLI, which prints what NDI’s own
agent sees, or over HTTP as below.
File paths
Folder metadata, file metadata, read file, QA file and query tables name a file by its
path: the full path relative to the workspace root, exactly as the file was
uploaded. It is the same string these return:
file_not_found is final for the path you sent. Retrying it, or guessing
variants of it, returns the same error. Find the real path first: call folder
metadata with name_contains set to a distinctive part of the file name, and
use the path it returns.
Folder metadata
Lists one folder: how many files it holds, their categories and ingestion
status, one summary per subfolder, and one page of file entries with their
exact paths. Start at / (the workspace root) and descend, or search the whole
workspace by name. The CLI command is
ndi folder-metadata.
directory is relative to the workspace root. / is the root;
evidence/doc-7f83 is a folder under it.
A call without narrows lists only the folder’s own files, plus a summary per
subfolder. Call again with a subfolder to descend.
name_contains, category, ingestion_status and kind narrow both the
counts and the listing, and search the whole subtree unless you send
"recursive": false. name_contains is case-insensitive, and it also finds
files whose ingestion failed.
Each file_entries[] entry carries the file’s file_id, the same id
GET /v1/workspaces/{id}/files returns, so a caller can go on to
GET /files/{file_id} without listing the files again. A server from before
the field leaves it out.
file_entries comes one page_size page at a time, sorted by path. When
files_truncated is true, call again with start_after set to the last
path you received.
A folder with no matches answers with a hint naming the nearest existing
folder. A directory that names a file is refused with invalid_request:
use file metadata for it.
File metadata
Describes one uploaded file without opening it: its category, a summary, and
the parts you can ask about. Pass the file’s path.New native-PDF ingestions also report read_coverage: pages_read,
pages_failed, and ocr_used. These describe the published generation, not
retry attempts or billing units. A successful native PDF read reports zero
failed pages because any page failure fails the entire parse. Whole-parse
failures appear as ingestion errors. Missing coverage on older, cached or
unsupported parse results means unknown; it does not mean zero pages or no OCR.
The same information appears in file metadata by file ID.
{ "path": "evidence/doc-7f83/PA 6006365_5_STAR.pdf", "file_id": "550e8400-e29b-41d4-a716-446655440002", "kind": "document", "ingestion_status": "ingested", "size_bytes": 455000, "category": "contracts/agreement", "page_count": 60, "summary": "Section 108 loan guarantee agreement for the city's sewer lateral program, effective for fiscal year 2025.", "components": [ { "kind": "section", "name": "agreement", "summary": "Agreement terms, including the NEPA environmental review on page 43.", "categories": ["contracts/agreement"], "key_terms": [ { "keyword": "6006365", "description": "Project agreement number" }, { "keyword": "march 31, 2025", "description": "Date the agreement was signed" } ], "page_start": 1, "page_end": 60, "readable": true, "queryable": false } ], "job_id": "550e8400-e29b-41d4-a716-446655440003"}
category and summary describe the file as a whole. summary is the
summary of the file’s first section or tab; each component has its own.
components lists the file’s sections (documents), tabs (spreadsheets), an
image, or a recording. A recording reports duration_ms and
speaker_count.
key_terms are up to six of a component’s extracted keywords whose role the
file states: who a name is, what a date or number marks. Files ingested
before key terms existed have none until they are re-ingested with
"reingest_unchanged": true.
readable means QA file can answer from the component’s text.
queryable means it is a table query tables can
compute over. Pass a component’s name as component to scope either tool.
Send "component": "<name>" to describe only that section or tab. An
unknown name is refused with invalid_request listing the valid names.
A file that is not ingested yet answers with its ingestion_status and no
components. A failed file carries ingestion_error.
File metadata by file ID
When you hold a file id rather than a path, read the same context from the
files API: the file summary, keywords and their roles, and per-section or
per-sheet detail. The id comes from upload, the file listing, or
source_file_id on search evidence.
from ndi_sdk import NdiClientwith NdiClient() as client: workspace_id = "550e8400-e29b-41d4-a716-446655440001" file_id = "550e8400-e29b-41d4-a716-446655440002" meta = client.files.metadata(workspace_id, file_id) print(meta.summary, meta.keyword_descriptions) for section in meta.documents: print(section.summary, section.keyword_descriptions)
keywords remains a list of strings. Each entry in keyword_descriptions has
keyword and description; description is null when the source does not
establish the keyword’s role. Older ingests may have no descriptions. The same
fields appear for logical documents and spreadsheet sheets. native_metadata
contains properties supplied by the source file, such as a PDF creator.Each entry in sheets[] also has queryable, true when run SQL can
read the tab’s rows, and table_name, the name run SQL registers it under.
table_name is set for a workbook tab or a converted CSV and is null
otherwise, for example on a directly uploaded parquet file. A CSV tab is stored
as a partitioned dataset, so its jsonl_path and parquet_path are null even
though queryable is true. Ingestion may suffix the registered name to keep
names unique; locate gives the registered name.
Catalog
The typed fields ingestion extracted from every document: an invoice’s number,
parties, dates and total; a contract’s parties and dates; a report’s title and
period. Call it with no sql to list the tables, then run one read-only
SELECT (DuckDB dialect) over them. It answers inline: no job and no credits
(credits: 0, waiver: "no_job").
The CLI command is ndi catalog.
The answer lists catalog_document, with one row per record, and one table per
document type the workspace holds (invoice, contract, report, …) with
its typed columns. empty_tables names the types with no records here. They
are still queryable; a query over them returns no rows.
curl -s -X POST "$NDI_BASE_URL/v1/workspaces/$WS/tools/catalog" \ -H "X-API-Key: $NDI_API_KEY" \ -H "Content-Type: application/json" \ -d '{"sql":"SELECT source_path, invoice_number, total_amount, total_amount_currency FROM invoice WHERE total_amount > 250000 ORDER BY total_amount DESC"}'
A record is one document section, spreadsheet tab, recording or JSON
section, never one printed line. The entries a listing, register or ledger
prints (each credit note in a credit-note report) are not records of their
own: the listing is one record. Read it with read file, or
query a tab’s rows with run SQL.
Every field has a <field>_status column: found, not_found, ambiguous
or unexamined. Only found carries a value, so a comparison on the value
column leaves out the other three. Money fields have a <field>_currency
column.
A field that can hold several values (parties, references) has its own
table, such as invoice_reference, with one row per value. Filter with
EXISTS (... WHERE invoice_reference.record_id = invoice.record_id ...).
source_path is the path the other file tools take.
Rows are capped. truncated is true when the result had more rows than
were returned; narrow the statement, or page it with ORDER BY, LIMIT and
OFFSET.
A statement that is not a read, or that fails, is refused with
invalid_request and the reason. So is a workspace whose catalog is too
large to query whole.
The catalog shows only records your access labels allow.
Locate
Names the pages and table tabs that hold a piece of information, across every
ingested file you may see. It is the locator NDI’s own search agent calls
between reads: a decision model rates every file, section and page and names
the best k (default 12, at most 24). It is good at where, not at
whether: a named page may hold the wrong period or line, so read it before
you rely on it.
curl -s -X POST "$NDI_BASE_URL/v1/workspaces/$WS/tools/locate" \ -H "X-API-Key: $NDI_API_KEY" \ -H "Content-Type: application/json" \ -d '{"question":"What dividends per share were declared in 2023 and 2024?","need":"2023 dividends declared per share","k":3}'
{ "text": "What a locator found for this question, best first (read a piece exactly as it is named: …):\n\n[1] reports/fy24-annual-report.pdf — page 87 (notes; score 0.94) → `ndi read-file reports/fy24-annual-report.pdf --pages 87`\n[page text]\nNote 21 Dividends. Dividends declared per share were $0.92 in 2024 and $0.88 in 2023 …\n…", "pages": [ { "path": "reports/fy24-annual-report.pdf", "component": null, "paged": true, "number": 87, "score": 0.94, "head": "Note 21 Dividends. Dividends declared per share were $0.92 in 2024 and $0.88 in 2023 …" } ], "tables": [ { "sql_table": "t_dividends_2a1f", "path": "ledgers/equity.xlsx", "tab": "Dividends", "score": 0.71, "columns": ["date", "per_share", "total"], "relevant_columns": ["date", "per_share"] } ], "population": [], "population_unrated": 0, "job_id": "550e8400-e29b-41d4-a716-446655440003"}
need (up to 400 characters) is what you still need, in a few words: a
year, an entity, a line item. question is the whole question it is part
of; omit it and the need is the whole question.
path_prefix and paths narrow the files. A path you cannot see or that
does not exist is refused with file_not_found.
text is the reply as NDI’s agent reads it, with each piece’s read named as
an ndi read-file command (the ndi CLI runs every command
the text names as printed). pages, tables and population carry the same
findings: a paged piece is page number; otherwise it is lines
line_start–line_end of the file’s text. population is set when the
question needs every file of a kind (each invoice, every contract); send
"every": true to ask for that list. population_unrated above 0 means the
list is incomplete: narrow the need to a folder, kind or period.
Locate is stateless. To be shown something new, send back the pieces you were
offered as exclude (path, number, component) and what you read as
already_read (path with pages, a line_start–line_end span, or
neither for the whole file); up to 1,000 of each. The ndi CLI
does this for you. A call that leaves out nothing is your task’s opening: the
locator rates more files for it.
text gives the best pages in full (as above). Send "pointer": true to name
every piece by its opening lines instead, starting Located for: <need>: a
task’s later locates do, so page text does not pile up in an agent’s context.
upstream_unavailable means the decision model is down: retry later.
invalid_request with “not configured” means the deployment has no locator.
Locate runs on NDI-managed workspace storage only; a workspace in your own
bucket answers invalid_request.
The CLI command is ndi locate. It keeps
exclude and already_read for you under a locate id, which it prints first:
ndi locate "2023 dividends declared per share" --question "What dividends per share were declared in 2023 and 2024?"ndi locate "2024 dividends declared per share" --pointer --locate-id loc_7f3a2c1d
Read file
Returns the text of one ingested file: the whole file, one component (a tab
or section, as file metadata lists it), some pages (1-based; spreadsheets
have none), or the lines line_start–line_end of that text. A file with
several components comes back concatenated, each under a one-line header.
{ "path": "reports/fy24-annual-report.pdf", "file_id": "550e8400-e29b-41d4-a716-446655440002", "content": "--- Page 87 ---\nNote 21 Dividends. Dividends declared per share were $0.92 in 2024 and $0.88 in 2023 …", "pages_returned": [87], "truncated": false, "components_returned": ["annual_report"], "components_omitted": [], "sql_tables": [], "job_id": "550e8400-e29b-41d4-a716-446655440004"}
max_chars (default 200,000, at most 1,000,000) bounds content;
truncated says it was cut, and components_omitted names what did not fit.
A line range answers line_start, line_end and the whole text’s
line_count; when it starts inside a table, table gives that table’s
header so the rows read with their column names.
sql_tables names the run SQL tables that hold the rows of long
PDF tables in the returned text: count or total those rows there. A
spreadsheet or CSV tab is not listed here; its table name is sheets[].table_name
in file metadata by file ID, or tables[].sql_table
from locate.
Images are refused with unsupported_file_type: ask them with QA file.
Run SQL
Runs one read-only SELECT (DuckDB dialect) over the workspace’s tables. Each
queryable tab is a table under the name locate gives as
tables[].sql_table; file metadata by file ID
gives it as sheets[].table_name for workbook tabs and converted CSVs; joins across files are
ordinary SQL joins. There is no agent in the loop: write the statement
yourself, or use query tables to ask in words.
curl -s -X POST "$NDI_BASE_URL/v1/workspaces/$WS/tools/run-sql" \ -H "X-API-Key: $NDI_API_KEY" \ -H "Content-Type: application/json" \ -d '{"sql":"SELECT date, per_share FROM t_dividends_2a1f ORDER BY date"}'
result previews the rows (rows, columns, row_count;
preview_truncated when the preview is cut). The whole result is retained:
result_citation.result_file.download_url fetches it as parquet.
result.handle (res_…) is a table in your next statement: join it,
aggregate it, or page it with LIMIT/OFFSET. A handle resolves only in the
workspace that returned it, and only while you see the same tables. A
repeated statement is answered from the stored result (duplicate: true)
and is not billed once an earlier run of it has been billed; the first run costs one
credit.
A statement that is not a read, or that names a table that is not
registered, is refused with invalid_request naming the rule and the tables
you may read.
The CLI commands are ndi read-file and
ndi run-sql:
ndi read-file reports/fy24-annual-report.pdf --pages 87ndi run-sql "SELECT date, per_share FROM t_dividends_2a1f"ndi run-sql "SELECT SUM(per_share) AS total FROM res_0123456789ab" # an earlier result's handle is a table
QA file
Ask a natural-language question of one uploaded file: a document, a
workbook, an image, or a recording. For a question across several
spreadsheets, use query tables.
from ndi_sdk import NdiClientwith NdiClient() as client: workspace_id = "550e8400-e29b-41d4-a716-446655440001" answer = client.tools.qa_file( workspace_id, path="reports/report.pdf", query="What were total liabilities at year end?", ) print(answer.answer) for citation in answer.citations or []: print(citation)
For a document, each citation is a verbatim passage the engine took from the
file. For a spreadsheet or CSV, the snippet is the matching rows as the engine
read them, written as JSON objects (one per row, keyed by column name), so it is
not text you can find byte for byte in the uploaded file. A snippet is cut at
500 characters, so a long one may end mid-row and not parse as JSON. There may be several
citations, or none: an answer the engine assembled by searching the document
rather than reading one passage has nothing to quote, and says so by citing
nothing.A citation carries a locator only when the engine located the passage as it
read. Otherwise locator is null and the citation names the file, not a span
inside it. To place one of those, pass its snippet to
ground against the same path.Billing depends on the engine that answered. A question answered from one
piece of content is not billed: one text section or transcript (recursive_llm),
or one image, page or figure (vision), including a question scoped with
component. A question about a table, or across several parts (engine is
agent), bills one credit per agent step; the job’s usage shows the total.QA file continues after an HTTP disconnect. Current Python and TypeScript SDKs
submit a durable job and poll it; qa_file still returns QaFileResponse, and
they accept direct answers from older servers. Omit Prefer and the request
waits for the original answer response; if your client’s own timeout fires
first, the run keeps going and its answer is kept on the job. For direct HTTP
integrations, send Prefer: respond-async with a stable Idempotency-Key: the
response is a Job (202 while pending, 200 when terminal) with a Location
header pointing to GET /v1/jobs/{job_id}. Retry a lost response with the same
key and body to recover the same job and its answer. POST /v1/jobs/{job_id}/cancel
stops a run and takes an optional JSON body {"reason": "..."} to record why.
DELETE /v1/jobs/{job_id} also cancels a queued or running job before hiding it.
Structured answers
Pass output_schema, a JSON Schema (or, in Python, a Pydantic model class),
to get the answer as JSON. Every engine honors it: the agent and the recursive
reader are checked and corrected, and a vision answer that misses the schema is
reshaped from what the model read. On success answer is the JSON text and
structured_answer the parsed value. A field the source does not state comes back null, whatever type the schema gives it.
If the answer still misses, the call still
succeeds and structured_answer is null. The schema root must be an object,
and pattern / patternProperties are refused (state a format in description),
as are a recursive $ref and unevaluatedProperties / unevaluatedItems.
from pydantic import BaseModelfrom ndi_sdk import NdiClientclass InvoiceTotal(BaseModel): invoice_number: str total: floatwith NdiClient() as client: workspace_id = "550e8400-e29b-41d4-a716-446655440001" answer = client.tools.qa_file( workspace_id, path="invoices/invoice.pdf", query="What is the invoice number and total?", output_schema=InvoiceTotal, ) if answer.structured_answer is not None: print(InvoiceTotal.model_validate(answer.structured_answer).total)
Errors
file_not_ingested — ingest first
invalid_request — qa_file on a derived output path, an unknown or ambiguous component, or a component with no content it can answer about; also an image (or rendered page) that cannot be decoded or exceeds the image safety limit, which is refused before inference and is not retryable
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"NDI Platform API","description":"Document intelligence platform API — parse, split, classify, extract, and ground information from any document.","colors":{"primary":"#111111","light":"#737373","dark":"#E5E5E5"},"favicon":"https://mintcdn.com/nace-ai/RoMHjaneGKdnwusm/favicon.png?fit=max\u0026auto=format\u0026n=RoMHjaneGKdnwusm\u0026q=85\u0026s=9b5d6ee38930c58bd4cc7e964e66a5b0","api":{"openapi":"openapi.json","playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["curl"],"autogenerate":true}},"appearance":{"default":"system"},"background":{"decoration":"gradient"},"footer":{"socials":{}},"seo":{"metatags":{"robots":"noindex"}},"icons":{"library":"lucide"},"styling":{"eyebrows":"breadcrumbs","codeblocks":"dark","latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"nace-ai","hasAudioNarration":false,"actualSubdomain":"nace-ai","customDomains":["docs.ndi.nace.ai"],"gitSource":{"type":"github","owner":"yeranaceai","repo":"ndi-service-api-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6b10f60a9ffae5051c4197fa"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6b14b4f195b29a8b67136491","clientVersion":"0.0.4458","searchFilterCounts":[{"language":"default","tag":"API Reference","count":106},{"language":"default","tag":"Documentation","count":44},{"language":"default","tag":"SDKs","count":36},{"language":"default","tag":"Core methods","count":28},{"language":"default","tag":"Guides","count":26},{"language":"default","tag":"Workspaces and files","count":25},{"language":"default","tag":"Catalog","count":22},{"language":"default","tag":"Tools and search","count":21},{"language":"default","tag":"Jobs and usage","count":16},{"language":"default","tag":"Concepts","count":12}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"guides/file-tools","slug":"/guides/file-tools","pageMetadata":{"title":"File tools","description":"Find a file's exact path, see what is inside it, and ask questions about it","href":"/guides/file-tools"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Find a file’s exact path, see what is inside it, and ask questions about it\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`These tools read ingested workspace files. Ingest a file before you use them.\nTool answers report `,_jsx(_components.code,{children:`credits`}),` billed for this call. Treat `,_jsx(_components.code,{children:`null`}),` as an unknown\namount; older stored answers can lack a billing receipt. Low-level job-backed tools\nnormally cost one credit; repeating a run-sql result that an earlier job already\npaid for costs zero with `,_jsx(_components.code,{children:`waiver: \"repeat_of_job\"`}),`. `,_jsx(_components.code,{children:`duplicate`}),` alone does not\nguarantee a waiver: a result stored by a cancelled or failed job may still be\nbillable. QA tools report their settled job’s credits, which can vary with the\nwork performed. Re-serving a settled tool answer with the same `,_jsx(_components.code,{children:`Idempotency-Key`}),`\nreports `,_jsx(_components.code,{children:`credits: 0`}),` and `,_jsx(_components.code,{children:`waiver: \"repeat_of_job\"`}),`, with the response header\n`,_jsx(_components.code,{children:`Idempotent-Replayed: true`}),`. A retry after a transient failure can re-execute\nthe tool and is billed when it succeeds; that fresh execution has no replay header.\nA job returned with `,_jsx(_components.code,{children:`Prefer: respond-async`}),` uses the\n`,_jsx(_components.a,{href:`/concepts/jobs-idempotency`,children:`job billing contract`}),` instead.`]}),`\n`,_jsx(_components.p,{children:`A typical agent loop:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Find the file.`}),` `,_jsx(_components.a,{href:`#folder-metadata`,children:`Folder metadata`}),` lists a folder and\nfinds files by name. Search results also name files (`,_jsx(_components.code,{children:`source_path`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`See what is inside.`}),` `,_jsx(_components.a,{href:`#file-metadata`,children:`File metadata`}),` describes one file:\nits category, a summary, and its sections or tabs with their own summaries\nand key terms.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Ask.`}),` `,_jsx(_components.a,{href:`#qa-file`,children:`QA file`}),` answers a question about one file;\n`,_jsx(_components.a,{href:`/guides/query-tables`,children:`query tables`}),` computes across spreadsheets.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`To filter files by type and extracted field (every invoice to one customer,\nevery contract that expires this year), query the `,_jsx(_components.a,{href:`#catalog`,children:`catalog`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`When you know what you need but not which file holds it, `,_jsx(_components.a,{href:`#locate`,children:`locate`}),`\nnames the pages and table tabs to read; `,_jsx(_components.a,{href:`#read-file`,children:`read file`}),` reads them and\n`,_jsx(_components.a,{href:`#run-sql`,children:`run SQL`}),` computes over the tables — the loop NDI’s own search agent\nruns.`]}),`\n`,_jsxs(_components.p,{children:[`Folder metadata, catalog, locate, read file and run SQL have no SDK or MCP\nmethod. Call them with the `,_jsxs(_components.a,{href:`/guides/cli`,children:[_jsx(_components.code,{children:`ndi`}),` CLI`]}),`, which prints what NDI’s own\nagent sees, or over HTTP as below.`]}),`\n`,_jsx(Heading,{level:`2`,id:`file-paths`,children:`File paths`}),`\n`,_jsxs(_components.p,{children:[`Folder metadata, file metadata, read file, QA file and query tables name a file by its\n`,_jsx(_components.strong,{children:`path`}),`: the full path relative to the workspace root, exactly as the file was\nuploaded. It is the same string these return:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`file_entries[].path`}),` from `,_jsx(_components.a,{href:`#folder-metadata`,children:`folder metadata`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`items[].path`}),` from `,_jsx(_components.code,{children:`GET /v1/workspaces/{workspace_id}/files`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`source_path`}),` on every search evidence item`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`source_path`}),` on every `,_jsx(_components.a,{href:`#catalog`,children:`catalog`}),` record`]}),`\n`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`You pass`}),_jsx(_components.th,{children:`Result`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`evidence/doc-7f83/PA 6006365_5_STAR.pdf`})}),_jsx(_components.td,{children:`Found: the full path as uploaded`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`/evidence/doc-7f83/PA 6006365_5_STAR.pdf`})}),_jsxs(_components.td,{children:[`Found: a leading `,_jsx(_components.code,{children:`/`}),` is ignored`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PA 6006365_5_STAR.pdf`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`file_not_found`}),`: a bare file name. It is a path only for a file uploaded at the workspace root`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`08c03222-…/evidence/doc-7f83/PA 6006365_5_STAR.pdf`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`file_not_found`}),`: paths never include the workspace id. The workspace id goes in the URL only`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`evidence/doc-7f83`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`file_not_found`}),`: a folder, not a file. List it with `,_jsx(_components.a,{href:`#folder-metadata`,children:`folder metadata`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`evidence/doc-7f83/pa 6006365_5_star.pdf`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`file_not_found`}),`: paths are case-sensitive, and spaces count`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`Prior workpaper 421aa79d (Understand entity)`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`file_not_found`}),`: a title or label is not a path`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`550e8400-e29b-41d4-a716-446655440002`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`file_not_found`}),`: a file id. Use `,_jsx(_components.a,{href:`#file-metadata-by-file-id`,children:`file metadata by id`})]})]})]})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`file_not_found`}),` is final for the path you sent. Retrying it, or guessing\nvariants of it, returns the same error. Find the real path first: call folder\nmetadata with `,_jsx(_components.code,{children:`name_contains`}),` set to a distinctive part of the file name, and\nuse the `,_jsx(_components.code,{children:`path`}),` it returns.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`folder-metadata`,children:`Folder metadata`}),`\n`,_jsxs(_components.p,{children:[`Lists one folder: how many files it holds, their categories and ingestion\nstatus, one summary per subfolder, and one page of file entries with their\nexact paths. Start at `,_jsx(_components.code,{children:`/`}),` (the workspace root) and descend, or search the whole\nworkspace by name. The `,_jsx(_components.a,{href:`/guides/cli#folder-metadata-and-catalog`,children:`CLI`}),` command is\n`,_jsx(_components.code,{children:`ndi folder-metadata`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -s`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$NDI_BASE_URL`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`/v1/workspaces/`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$WS`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`/tools/folder-metadata\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$NDI_API_KEY`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` '{\"directory\":\"/\",\"name_contains\":\"6006365_5_STAR\"}'`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`21`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`21`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"directory\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"/\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"overall_files\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"categories\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [{ `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"contracts/agreement\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"count\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` }],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"subdirectories\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [{ `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"evidence\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"overall_files\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"top_categories\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [{ `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"contracts/agreement\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"count\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` }] }],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"ingestion_summary\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"ingested\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"files_truncated\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"file_entries\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"path\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"evidence/doc-7f83/PA 6006365_5_STAR.pdf\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"ingestion_status\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"ingested\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"size_bytes\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`455000`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"category\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"contracts/agreement\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"kind\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"document\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"uploaded_at\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-01T12:00:00Z\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"file_id\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"550e8400-e29b-41d4-a716-446655440002\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"coverage\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"restricted_candidates\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"labels_required\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [] },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"job_id\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"550e8400-e29b-41d4-a716-446655440004\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`directory`}),` is relative to the workspace root. `,_jsx(_components.code,{children:`/`}),` is the root;\n`,_jsx(_components.code,{children:`evidence/doc-7f83`}),` is a folder under it.`]}),`\n`,_jsx(_components.li,{children:`A call without narrows lists only the folder’s own files, plus a summary per\nsubfolder. Call again with a subfolder to descend.`}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`name_contains`}),`, `,_jsx(_components.code,{children:`category`}),`, `,_jsx(_components.code,{children:`ingestion_status`}),` and `,_jsx(_components.code,{children:`kind`}),` narrow both the\ncounts and the listing, and search the whole subtree unless you send\n`,_jsx(_components.code,{children:`\"recursive\": false`}),`. `,_jsx(_components.code,{children:`name_contains`}),` is case-insensitive, and it also finds\nfiles whose ingestion failed.`]}),`\n`,_jsxs(_components.li,{children:[`Each `,_jsx(_components.code,{children:`file_entries[]`}),` entry carries the file’s `,_jsx(_components.code,{children:`file_id`}),`, the same id\n`,_jsx(_components.code,{children:`GET /v1/workspaces/{id}/files`}),` returns, so a caller can go on to\n`,_jsx(_components.code,{children:`GET /files/{file_id}`}),` without listing the files again. A server from before\nthe field leaves it out.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`file_entries`}),` comes one `,_jsx(_components.code,{children:`page_size`}),` page at a time, sorted by path. When\n`,_jsx(_components.code,{children:`files_truncated`}),` is `,_jsx(_components.code,{children:`true`}),`, call again with `,_jsx(_components.code,{children:`start_after`}),` set to the last\npath you received.`]}),`\n`,_jsxs(_components.li,{children:[`A folder with no matches answers with a `,_jsx(_components.code,{children:`hint`}),` naming the nearest existing\nfolder. A `,_jsx(_components.code,{children:`directory`}),` that names a file is refused with `,_jsx(_components.code,{children:`invalid_request`}),`:\nuse file metadata for it.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`file-metadata`,children:`File metadata`}),`\n`,_jsxs(_components.p,{children:[`Describes one uploaded file without opening it: its category, a summary, and\nthe parts you can ask about. Pass the file’s `,_jsx(_components.a,{href:`#file-paths`,children:`path`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`New native-PDF ingestions also report `,_jsx(_components.code,{children:`read_coverage`}),`: `,_jsx(_components.code,{children:`pages_read`}),`,\n`,_jsx(_components.code,{children:`pages_failed`}),`, and `,_jsx(_components.code,{children:`ocr_used`}),`. These describe the published generation, not\nretry attempts or billing units. A successful native PDF read reports zero\nfailed pages because any page failure fails the entire parse. Whole-parse\nfailures appear as ingestion errors. Missing coverage on older, cached or\nunsupported parse results means unknown; it does not mean zero pages or no OCR.\nThe same information appears in file metadata by file ID.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -s`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$NDI_BASE_URL`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`/v1/workspaces/`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$WS`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`/tools/file-metadata\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$NDI_API_KEY`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` '{\"path\":\"evidence/doc-7f83/PA 6006365_5_STAR.pdf\"}'`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`27`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`27`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"path\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"evidence/doc-7f83/PA 6006365_5_STAR.pdf\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"file_id\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"550e8400-e29b-41d4-a716-446655440002\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"kind\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"document\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"ingestion_status\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"ingested\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"size_bytes\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`455000`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"category\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"contracts/agreement\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"page_count\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`60`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"summary\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Section 108 loan guarantee agreement for the city's sewer lateral program, effective for fiscal year 2025.\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"components\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"kind\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"section\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"agreement\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"summary\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Agreement terms, including the NEPA environmental review on page 43.\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"categories\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"contracts/agreement\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"key_terms\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"keyword\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"6006365\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"description\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Project agreement number\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"keyword\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"march 31, 2025\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"description\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Date the agreement was signed\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"page_start\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"page_end\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`60`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"readable\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"queryable\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`false`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"job_id\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"550e8400-e29b-41d4-a716-446655440003\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`category`}),` and `,_jsx(_components.code,{children:`summary`}),` describe the file as a whole. `,_jsx(_components.code,{children:`summary`}),` is the\nsummary of the file’s first section or tab; each component has its own.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`components`}),` lists the file’s sections (documents), tabs (spreadsheets), an\nimage, or a recording. A recording reports `,_jsx(_components.code,{children:`duration_ms`}),` and\n`,_jsx(_components.code,{children:`speaker_count`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`key_terms`}),` are up to six of a component’s extracted keywords whose role the\nfile states: who a name is, what a date or number marks. Files ingested\nbefore key terms existed have none until they are re-ingested with\n`,_jsx(_components.code,{children:`\"reingest_unchanged\": true`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`readable`}),` means `,_jsx(_components.a,{href:`#qa-file`,children:`QA file`}),` can answer from the component’s text.\n`,_jsx(_components.code,{children:`queryable`}),` means it is a table `,_jsx(_components.a,{href:`/guides/query-tables`,children:`query tables`}),` can\ncompute over. Pass a component’s `,_jsx(_components.code,{children:`name`}),` as `,_jsx(_components.code,{children:`component`}),` to scope either tool.`]}),`\n`,_jsxs(_components.li,{children:[`Send `,_jsx(_components.code,{children:`\"component\": \"\u003cname>\"`}),` to describe only that section or tab. An\nunknown name is refused with `,_jsx(_components.code,{children:`invalid_request`}),` listing the valid names.`]}),`\n`,_jsxs(_components.li,{children:[`A file that is not ingested yet answers with its `,_jsx(_components.code,{children:`ingestion_status`}),` and no\ncomponents. A failed file carries `,_jsx(_components.code,{children:`ingestion_error`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`file-metadata-by-file-id`,children:`File metadata by file ID`}),`\n`,_jsxs(_components.p,{children:[`When you hold a file `,_jsx(_components.strong,{children:`id`}),` rather than a path, read the same context from the\nfiles API: the file summary, keywords and their roles, and per-section or\nper-sheet detail. The id comes from upload, the file listing, or\n`,_jsx(_components.code,{children:`source_file_id`}),` on search evidence.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` ndi_sdk `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` NdiClient`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`with`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` NdiClient() `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` client:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` workspace_id = `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"550e8400-e29b-41d4-a716-446655440001\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` file_id = `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"550e8400-e29b-41d4-a716-446655440002\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` meta = client.files.metadata(workspace_id, file_id)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(meta.summary, meta.keyword_descriptions)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` section `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` meta.documents:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(section.summary, section.keyword_descriptions)`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`keywords`}),` remains a list of strings. Each entry in `,_jsx(_components.code,{children:`keyword_descriptions`}),` has\n`,_jsx(_components.code,{children:`keyword`}),` and `,_jsx(_components.code,{children:`description`}),`; `,_jsx(_components.code,{children:`description`}),` is `,_jsx(_components.code,{children:`null`}),` when the source does not\nestablish the keyword’s role. Older ingests may have no descriptions. The same\nfields appear for logical documents and spreadsheet sheets. `,_jsx(_components.code,{children:`native_metadata`}),`\ncontains properties supplied by the source file, such as a PDF creator.`]}),`\n`,_jsxs(_components.p,{children:[`Each entry in `,_jsx(_components.code,{children:`sheets[]`}),` also has `,_jsx(_components.code,{children:`queryable`}),`, true when `,_jsx(_components.a,{href:`#run-sql`,children:`run SQL`}),` can\nread the tab’s rows, and `,_jsx(_components.code,{children:`table_name`}),`, the name run SQL registers it under.\n`,_jsx(_components.code,{children:`table_name`}),` is set for a workbook tab or a converted CSV and is `,_jsx(_components.code,{children:`null`}),`\notherwise, for example on a directly uploaded parquet file. A CSV tab is stored\nas a partitioned dataset, so its `,_jsx(_components.code,{children:`jsonl_path`}),` and `,_jsx(_components.code,{children:`parquet_path`}),` are `,_jsx(_components.code,{children:`null`}),` even\nthough `,_jsx(_components.code,{children:`queryable`}),` is true. Ingestion may suffix the registered name to keep\nnames unique; `,_jsx(_components.a,{href:`#locate`,children:`locate`}),` gives the registered name.`]}),`\n`,_jsx(Heading,{level:`2`,id:`catalog`,children:`Catalog`}),`\n`,_jsxs(_components.p,{children:[`The typed fields ingestion extracted from every document: an invoice’s number,\nparties, dates and total; a contract’s parties and dates; a report’s title and\nperiod. Call it with no `,_jsx(_components.code,{children:`sql`}),` to list the tables, then run one read-only\n`,_jsx(_components.code,{children:`SELECT`}),` (DuckDB dialect) over them. It answers inline: no job and no credits\n(`,_jsx(_components.code,{children:`credits: 0`}),`, `,_jsx(_components.code,{children:`waiver: \"no_job\"`}),`).\nThe `,_jsx(_components.a,{href:`/guides/cli#folder-metadata-and-catalog`,children:`CLI`}),` command is `,_jsx(_components.code,{children:`ndi catalog`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -s`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$NDI_BASE_URL`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`/v1/workspaces/`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$WS`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`/tools/catalog\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$NDI_API_KEY`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` '{}'`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The answer lists `,_jsx(_components.code,{children:`catalog_document`}),`, with one row per record, and one table per\ndocument type the workspace holds (`,_jsx(_components.code,{children:`invoice`}),`, `,_jsx(_components.code,{children:`contract`}),`, `,_jsx(_components.code,{children:`report`}),`, …) with\nits typed columns. `,_jsx(_components.code,{children:`empty_tables`}),` names the types with no records here. They\nare still queryable; a query over them returns no rows.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -s`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$NDI_BASE_URL`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`/v1/workspaces/`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$WS`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`/tools/catalog\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$NDI_API_KEY`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` '{\"sql\":\"SELECT source_path, invoice_number, total_amount, total_amount_currency FROM invoice WHERE total_amount > 250000 ORDER BY total_amount DESC\"}'`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`19`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`19`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"columns\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"source_path\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"invoice_number\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"total_amount\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"total_amount_currency\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"rows\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"source_path\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"funky_town/t1_01_Invoice.pdf\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"invoice_number\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"I38290-1\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_amount\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"271535.95\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_amount_currency\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"USD\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"source_path\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"funky_town/t1_05_Supplier_Invoice.pdf\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"invoice_number\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"MSW-2025-1187\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_amount\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"271535.95\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_amount_currency\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"USD\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"row_count\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"truncated\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`false`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`A record is one document section, spreadsheet tab, recording or JSON\nsection, never one printed line. The entries a listing, register or ledger\nprints (each credit note in a credit-note report) are not records of their\nown: the listing is one record. Read it with `,_jsx(_components.a,{href:`#read-file`,children:`read file`}),`, or\nquery a tab’s rows with `,_jsx(_components.a,{href:`#run-sql`,children:`run SQL`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Every field has a `,_jsx(_components.code,{children:`\u003cfield>_status`}),` column: `,_jsx(_components.code,{children:`found`}),`, `,_jsx(_components.code,{children:`not_found`}),`, `,_jsx(_components.code,{children:`ambiguous`}),`\nor `,_jsx(_components.code,{children:`unexamined`}),`. Only `,_jsx(_components.code,{children:`found`}),` carries a value, so a comparison on the value\ncolumn leaves out the other three. Money fields have a `,_jsx(_components.code,{children:`\u003cfield>_currency`}),`\ncolumn.`]}),`\n`,_jsxs(_components.li,{children:[`A field that can hold several values (parties, references) has its own\ntable, such as `,_jsx(_components.code,{children:`invoice_reference`}),`, with one row per value. Filter with\n`,_jsx(_components.code,{children:`EXISTS (... WHERE invoice_reference.record_id = invoice.record_id ...)`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`source_path`}),` is the path the other file tools take.`]}),`\n`,_jsxs(_components.li,{children:[`Rows are capped. `,_jsx(_components.code,{children:`truncated`}),` is `,_jsx(_components.code,{children:`true`}),` when the result had more rows than\nwere returned; narrow the statement, or page it with `,_jsx(_components.code,{children:`ORDER BY`}),`, `,_jsx(_components.code,{children:`LIMIT`}),` and\n`,_jsx(_components.code,{children:`OFFSET`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`A statement that is not a read, or that fails, is refused with\n`,_jsx(_components.code,{children:`invalid_request`}),` and the reason. So is a workspace whose catalog is too\nlarge to query whole.`]}),`\n`,_jsx(_components.li,{children:`The catalog shows only records your access labels allow.`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`locate`,children:`Locate`}),`\n`,_jsxs(_components.p,{children:[`Names the pages and table tabs that hold a piece of information, across every\ningested file you may see. It is the locator NDI’s own search agent calls\nbetween reads: a decision model rates every file, section and page and names\nthe best `,_jsx(_components.code,{children:`k`}),` (default 12, at most 24). It is good at `,_jsx(_components.em,{children:`where`}),`, not at\n`,_jsx(_components.em,{children:`whether`}),`: a named page may hold the wrong period or line, so read it before\nyou rely on it.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -s`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$NDI_BASE_URL`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`/v1/workspaces/`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$WS`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`/tools/locate\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$NDI_API_KEY`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` '{\"question\":\"What dividends per share were declared in 2023 and 2024?\",\"need\":\"2023 dividends declared per share\",\"k\":3}'`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`26`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`26`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"What a locator found for this question, best first (read a piece exactly as it is named: …):`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n\\\\n`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:\"[1] reports/fy24-annual-report.pdf — page 87 (notes; score 0.94) → `ndi read-file reports/fy24-annual-report.pdf --pages 87`\"}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`[page text]`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`Note 21 Dividends. Dividends declared per share were $0.92 in 2024 and $0.88 in 2023 …`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`…\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"pages\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"path\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"reports/fy24-annual-report.pdf\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"component\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"paged\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"number\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`87`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"score\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`0.94`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"head\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Note 21 Dividends. Dividends declared per share were $0.92 in 2024 and $0.88 in 2023 …\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"tables\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"sql_table\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"t_dividends_2a1f\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"path\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"ledgers/equity.xlsx\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"tab\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Dividends\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"score\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`0.71`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"columns\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"date\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"per_share\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"total\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"relevant_columns\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"date\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"per_share\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"population\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"population_unrated\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"job_id\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"550e8400-e29b-41d4-a716-446655440003\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`need`}),` (up to 400 characters) is what you still need, in a few words: a\nyear, an entity, a line item. `,_jsx(_components.code,{children:`question`}),` is the whole question it is part\nof; omit it and the need is the whole question.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`path_prefix`}),` and `,_jsx(_components.code,{children:`paths`}),` narrow the files. A path you cannot see or that\ndoes not exist is refused with `,_jsx(_components.code,{children:`file_not_found`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`text`}),` is the reply as NDI’s agent reads it, with each piece’s read named as\nan `,_jsx(_components.code,{children:`ndi read-file`}),` command (the `,_jsxs(_components.a,{href:`/guides/cli`,children:[_jsx(_components.code,{children:`ndi`}),` CLI`]}),` runs every command\nthe text names as printed). `,_jsx(_components.code,{children:`pages`}),`, `,_jsx(_components.code,{children:`tables`}),` and `,_jsx(_components.code,{children:`population`}),` carry the same\nfindings: a `,_jsx(_components.code,{children:`paged`}),` piece is page `,_jsx(_components.code,{children:`number`}),`; otherwise it is lines\n`,_jsx(_components.code,{children:`line_start`}),`–`,_jsx(_components.code,{children:`line_end`}),` of the file’s text. `,_jsx(_components.code,{children:`population`}),` is set when the\nquestion needs every file of a kind (each invoice, every contract); send\n`,_jsx(_components.code,{children:`\"every\": true`}),` to ask for that list. `,_jsx(_components.code,{children:`population_unrated`}),` above 0 means the\nlist is incomplete: narrow the need to a folder, kind or period.`]}),`\n`,_jsxs(_components.li,{children:[`Locate is stateless. To be shown something new, send back the pieces you were\noffered as `,_jsx(_components.code,{children:`exclude`}),` (`,_jsx(_components.code,{children:`path`}),`, `,_jsx(_components.code,{children:`number`}),`, `,_jsx(_components.code,{children:`component`}),`) and what you read as\n`,_jsx(_components.code,{children:`already_read`}),` (`,_jsx(_components.code,{children:`path`}),` with `,_jsx(_components.code,{children:`pages`}),`, a `,_jsx(_components.code,{children:`line_start`}),`–`,_jsx(_components.code,{children:`line_end`}),` span, or\nneither for the whole file); up to 1,000 of each. The `,_jsxs(_components.a,{href:`/guides/cli#locate-read-run-sql`,children:[_jsx(_components.code,{children:`ndi`}),` CLI`]}),`\ndoes this for you. A call that leaves out nothing is your task’s opening: the\nlocator rates more files for it.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`text`}),` gives the best pages in full (as above). Send `,_jsx(_components.code,{children:`\"pointer\": true`}),` to name\nevery piece by its opening lines instead, starting `,_jsx(_components.code,{children:`Located for: \u003cneed>`}),`: a\ntask’s later locates do, so page text does not pile up in an agent’s context.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`upstream_unavailable`}),` means the decision model is down: retry later.\n`,_jsx(_components.code,{children:`invalid_request`}),` with “not configured” means the deployment has no locator.\nLocate runs on NDI-managed workspace storage only; a workspace in your own\nbucket answers `,_jsx(_components.code,{children:`invalid_request`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.a,{href:`/guides/cli#locate-read-run-sql`,children:`CLI`}),` command is `,_jsx(_components.code,{children:`ndi locate`}),`. It keeps\n`,_jsx(_components.code,{children:`exclude`}),` and `,_jsx(_components.code,{children:`already_read`}),` for you under a locate id, which it prints first:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`ndi`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` locate`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"2023 dividends declared per share\"`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --question`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"What dividends per share were declared in 2023 and 2024?\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`ndi`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` locate`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"2024 dividends declared per share\"`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --pointer`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --locate-id`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` loc_7f3a2c1d`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`read-file`,children:`Read file`}),`\n`,_jsxs(_components.p,{children:[`Returns the text of one ingested file: the whole file, one `,_jsx(_components.code,{children:`component`}),` (a tab\nor section, as file metadata lists it), some `,_jsx(_components.code,{children:`pages`}),` (1-based; spreadsheets\nhave none), or the lines `,_jsx(_components.code,{children:`line_start`}),`–`,_jsx(_components.code,{children:`line_end`}),` of that text. A file with\nseveral components comes back concatenated, each under a one-line header.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -s`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$NDI_BASE_URL`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`/v1/workspaces/`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$WS`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`/tools/read-file\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$NDI_API_KEY`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` '{\"path\":\"reports/fy24-annual-report.pdf\",\"pages\":[87]}'`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"path\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"reports/fy24-annual-report.pdf\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"file_id\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"550e8400-e29b-41d4-a716-446655440002\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"--- Page 87 ---`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`Note 21 Dividends. Dividends declared per share were $0.92 in 2024 and $0.88 in 2023 …\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"pages_returned\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`87`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"truncated\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"components_returned\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"annual_report\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"components_omitted\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"sql_tables\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"job_id\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"550e8400-e29b-41d4-a716-446655440004\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`max_chars`}),` (default 200,000, at most 1,000,000) bounds `,_jsx(_components.code,{children:`content`}),`;\n`,_jsx(_components.code,{children:`truncated`}),` says it was cut, and `,_jsx(_components.code,{children:`components_omitted`}),` names what did not fit.`]}),`\n`,_jsxs(_components.li,{children:[`A line range answers `,_jsx(_components.code,{children:`line_start`}),`, `,_jsx(_components.code,{children:`line_end`}),` and the whole text’s\n`,_jsx(_components.code,{children:`line_count`}),`; when it starts inside a table, `,_jsx(_components.code,{children:`table`}),` gives that table’s\nheader so the rows read with their column names.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`sql_tables`}),` names the `,_jsx(_components.a,{href:`#run-sql`,children:`run SQL`}),` tables that hold the rows of long\nPDF tables in the returned text: count or total those rows there. A\nspreadsheet or CSV tab is not listed here; its table name is `,_jsx(_components.code,{children:`sheets[].table_name`}),`\nin `,_jsx(_components.a,{href:`#file-metadata-by-file-id`,children:`file metadata by file ID`}),`, or `,_jsx(_components.code,{children:`tables[].sql_table`}),`\nfrom `,_jsx(_components.a,{href:`#locate`,children:`locate`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Images are refused with `,_jsx(_components.code,{children:`unsupported_file_type`}),`: ask them with `,_jsx(_components.a,{href:`#qa-file`,children:`QA file`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`run-sql`,children:`Run SQL`}),`\n`,_jsxs(_components.p,{children:[`Runs one read-only `,_jsx(_components.code,{children:`SELECT`}),` (DuckDB dialect) over the workspace’s tables. Each\nqueryable tab is a table under the name `,_jsx(_components.a,{href:`#locate`,children:`locate`}),` gives as\n`,_jsx(_components.code,{children:`tables[].sql_table`}),`; `,_jsx(_components.a,{href:`#file-metadata-by-file-id`,children:`file metadata by file ID`}),`\ngives it as `,_jsx(_components.code,{children:`sheets[].table_name`}),` for workbook tabs and converted CSVs; joins across files are\nordinary SQL joins. There is no agent in the loop: write the statement\nyourself, or use `,_jsx(_components.a,{href:`/guides/query-tables`,children:`query tables`}),` to ask in words.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -s`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$NDI_BASE_URL`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`/v1/workspaces/`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$WS`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`/tools/run-sql\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$NDI_API_KEY`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` '{\"sql\":\"SELECT date, per_share FROM t_dividends_2a1f ORDER BY date\"}'`})]}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`result`}),` previews the rows (`,_jsx(_components.code,{children:`rows`}),`, `,_jsx(_components.code,{children:`columns`}),`, `,_jsx(_components.code,{children:`row_count`}),`;\n`,_jsx(_components.code,{children:`preview_truncated`}),` when the preview is cut). The whole result is retained:\n`,_jsx(_components.code,{children:`result_citation.result_file.download_url`}),` fetches it as parquet.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`result.handle`}),` (`,_jsx(_components.code,{children:`res_…`}),`) is a table in your next statement: join it,\naggregate it, or page it with `,_jsx(_components.code,{children:`LIMIT`}),`/`,_jsx(_components.code,{children:`OFFSET`}),`. A handle resolves only in the\nworkspace that returned it, and only while you see the same tables. A\nrepeated statement is answered from the stored result (`,_jsx(_components.code,{children:`duplicate: true`}),`)\nand is not billed once an earlier run of it has been billed; the first run costs one\ncredit.`]}),`\n`,_jsxs(_components.li,{children:[`A statement that is not a read, or that names a table that is not\nregistered, is refused with `,_jsx(_components.code,{children:`invalid_request`}),` naming the rule and the tables\nyou may read.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.a,{href:`/guides/cli#locate-read-run-sql`,children:`CLI`}),` commands are `,_jsx(_components.code,{children:`ndi read-file`}),` and\n`,_jsx(_components.code,{children:`ndi run-sql`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`ndi`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` read-file`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` reports/fy24-annual-report.pdf`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --pages`}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:` 87`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`ndi`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` run-sql`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"SELECT date, per_share FROM t_dividends_2a1f\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`ndi`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` run-sql`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"SELECT SUM(per_share) AS total FROM res_0123456789ab\"`}),_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:` # an earlier result's handle is a table`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`qa-file`,children:`QA file`}),`\n`,_jsxs(_components.p,{children:[`Ask a natural-language question of `,_jsx(_components.strong,{children:`one uploaded file`}),`: a document, a\nworkbook, an image, or a recording. For a question across several\nspreadsheets, use `,_jsx(_components.a,{href:`/guides/query-tables`,children:`query tables`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` ndi_sdk `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` NdiClient`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`with`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` NdiClient() `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` client:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` workspace_id = `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"550e8400-e29b-41d4-a716-446655440001\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` answer = client.tools.qa_file(`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` workspace_id,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` path`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"reports/report.pdf\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` query`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"What were total liabilities at year end?\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(answer.answer)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` citation `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` answer.citations `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`or`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` []:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(citation)`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`For a document, each citation is a verbatim passage the engine took from the\nfile. For a spreadsheet or CSV, the `,_jsx(_components.code,{children:`snippet`}),` is the matching rows as the engine\nread them, written as JSON objects (one per row, keyed by column name), so it is\nnot text you can find byte for byte in the uploaded file. A `,_jsx(_components.code,{children:`snippet`}),` is cut at\n500 characters, so a long one may end mid-row and not parse as JSON. There may be several\ncitations, or none: an answer the engine assembled by searching the document\nrather than reading one passage has nothing to quote, and says so by citing\nnothing.`]}),`\n`,_jsxs(_components.p,{children:[`A citation carries a `,_jsx(_components.code,{children:`locator`}),` only when the engine located the passage as it\nread. Otherwise `,_jsx(_components.code,{children:`locator`}),` is `,_jsx(_components.code,{children:`null`}),` and the citation names the file, not a span\ninside it. To place one of those, pass its `,_jsx(_components.code,{children:`snippet`}),` to\n`,_jsx(_components.a,{href:`/guides/ground`,children:`ground`}),` against the same `,_jsx(_components.code,{children:`path`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Billing depends on the `,_jsx(_components.code,{children:`engine`}),` that answered. A question answered from one\npiece of content is not billed: one text section or transcript (`,_jsx(_components.code,{children:`recursive_llm`}),`),\nor one image, page or figure (`,_jsx(_components.code,{children:`vision`}),`), including a question scoped with\n`,_jsx(_components.code,{children:`component`}),`. A question about a table, or across several parts (`,_jsx(_components.code,{children:`engine`}),` is\n`,_jsx(_components.code,{children:`agent`}),`), bills one credit per agent step; the job’s `,_jsx(_components.code,{children:`usage`}),` shows the total.`]}),`\n`,_jsxs(_components.p,{children:[`QA file continues after an HTTP disconnect. Current Python and TypeScript SDKs\nsubmit a durable job and poll it; `,_jsx(_components.code,{children:`qa_file`}),` still returns `,_jsx(_components.code,{children:`QaFileResponse`}),`, and\nthey accept direct answers from older servers. Omit `,_jsx(_components.code,{children:`Prefer`}),` and the request\nwaits for the original answer response; if your client’s own timeout fires\nfirst, the run keeps going and its answer is kept on the job. For direct HTTP\nintegrations, send `,_jsx(_components.code,{children:`Prefer: respond-async`}),` with a stable `,_jsx(_components.code,{children:`Idempotency-Key`}),`: the\nresponse is a Job (`,_jsx(_components.code,{children:`202`}),` while pending, `,_jsx(_components.code,{children:`200`}),` when terminal) with a `,_jsx(_components.code,{children:`Location`}),`\nheader pointing to `,_jsx(_components.code,{children:`GET /v1/jobs/{job_id}`}),`. Retry a lost response with the same\nkey and body to recover the same job and its answer. `,_jsx(_components.code,{children:`POST /v1/jobs/{job_id}/cancel`}),`\nstops a run and takes an optional JSON body `,_jsx(_components.code,{children:`{\"reason\": \"...\"}`}),` to record why.\n`,_jsx(_components.code,{children:`DELETE /v1/jobs/{job_id}`}),` also cancels a queued or running job before hiding it.`]}),`\n`,_jsx(Heading,{level:`3`,id:`structured-answers`,children:`Structured answers`}),`\n`,_jsxs(_components.p,{children:[`Pass `,_jsx(_components.code,{children:`output_schema`}),`, a JSON Schema (or, in Python, a Pydantic model class),\nto get the answer as JSON. Every engine honors it: the agent and the recursive\nreader are checked and corrected, and a vision answer that misses the schema is\nreshaped from what the model read. On success `,_jsx(_components.code,{children:`answer`}),` is the JSON text and\n`,_jsx(_components.code,{children:`structured_answer`}),` the parsed value. A field the source does not state comes back `,_jsx(_components.code,{children:`null`}),`, whatever type the schema gives it.\nIf the answer still misses, the call still\nsucceeds and `,_jsx(_components.code,{children:`structured_answer`}),` is `,_jsx(_components.code,{children:`null`}),`. The schema root must be an object,\nand `,_jsx(_components.code,{children:`pattern`}),` / `,_jsx(_components.code,{children:`patternProperties`}),` are refused (state a format in `,_jsx(_components.code,{children:`description`}),`),\nas are a recursive `,_jsx(_components.code,{children:`$ref`}),` and `,_jsx(_components.code,{children:`unevaluatedProperties`}),` / `,_jsx(_components.code,{children:`unevaluatedItems`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`19`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`19`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` pydantic `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` BaseModel`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` ndi_sdk `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` NdiClient`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`class`}),_jsx(_components.span,{style:{color:`#4EC9B0`,\"--shiki-dark\":`#4EC9B0`},children:` InvoiceTotal`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#4EC9B0`,\"--shiki-dark\":`#4EC9B0`},children:`BaseModel`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` invoice_number: `}),_jsx(_components.span,{style:{color:`#4EC9B0`,\"--shiki-dark\":`#4EC9B0`},children:`str`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` total: `}),_jsx(_components.span,{style:{color:`#4EC9B0`,\"--shiki-dark\":`#4EC9B0`},children:`float`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`with`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` NdiClient() `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` client:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` workspace_id = `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"550e8400-e29b-41d4-a716-446655440001\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` answer = client.tools.qa_file(`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` workspace_id,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` path`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"invoices/invoice.pdf\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` query`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"What is the invoice number and total?\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` output_schema`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=InvoiceTotal,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` answer.structured_answer `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`is`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` not`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(InvoiceTotal.model_validate(answer.structured_answer).total)`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`file_not_ingested`})}),` — ingest first`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`invalid_request`})}),` — `,_jsx(_components.code,{children:`qa_file`}),` on a derived output path, an unknown or ambiguous `,_jsx(_components.code,{children:`component`}),`, or a component with no content it can answer about; also an image (or rendered page) that cannot be decoded or exceeds the image safety limit, which is refused before inference and is not retryable`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"File tools","description":"Find a file's exact path, see what is inside it, and ask questions about it","href":"/guides/file-tools"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"File paths","slug":"file-paths","depth":2,"children":[]},{"title":"Folder metadata","slug":"folder-metadata","depth":2,"children":[]},{"title":"File metadata","slug":"file-metadata","depth":2,"children":[]},{"title":"File metadata by file ID","slug":"file-metadata-by-file-id","depth":2,"children":[]},{"title":"Catalog","slug":"catalog","depth":2,"children":[]},{"title":"Locate","slug":"locate","depth":2,"children":[]},{"title":"Read file","slug":"read-file","depth":2,"children":[]},{"title":"Run SQL","slug":"run-sql","depth":2,"children":[]},{"title":"QA file","slug":"qa-file","depth":2,"children":[{"title":"Structured answers","slug":"structured-answers","depth":3,"children":[]}]},{"title":"Errors","slug":"errors","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"nace-ai","siteName":"NDI Platform API","title":"File tools - NDI Platform API","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-13T22:11:05.923Z","originalFileLocation":"guides/file-tools.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Find a file\u0026#x27;s exact path, see what is inside it, and ask questions about it\">\u003cmeta data-mint-head name=\"application-name\" content=\"NDI Platform API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"noindex\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/nace-ai/ON_ODtu5ozmA-6iq/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/nace-ai/ON_ODtu5ozmA-6iq/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/nace-ai/ON_ODtu5ozmA-6iq/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/nace-ai/ON_ODtu5ozmA-6iq/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/nace-ai/ON_ODtu5ozmA-6iq/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/nace-ai/ON_ODtu5ozmA-6iq/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/nace-ai/ON_ODtu5ozmA-6iq/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/nace-ai/ON_ODtu5ozmA-6iq/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/nace-ai/ON_ODtu5ozmA-6iq/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"File tools - NDI Platform API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Find a file\u0026#x27;s exact path, see what is inside it, and ask questions about it\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"NDI Platform API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.ndi.nace.ai/guides/file-tools\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://nace-ai.mintlify.site/_mintlify/api/og/v2?division=Guides\u0026amp;title=File+tools\u0026amp;description=Find+a+file%27s+exact+path%2C+see+what+is+inside+it%2C+and+ask+questions+about+it\u0026amp;theme=8e0aab37bff8a500df6616b2\u0026amp;signature=08556c5de05222924839f6f369eb3289fae29343737f07f3622d812ac3ea55f5\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"File tools - NDI Platform API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Find a file\u0026#x27;s exact path, see what is inside it, and ask questions about it\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://nace-ai.mintlify.site/_mintlify/api/og/v2?division=Guides\u0026amp;title=File+tools\u0026amp;description=Find+a+file%27s+exact+path%2C+see+what+is+inside+it%2C+and+ask+questions+about+it\u0026amp;theme=8e0aab37bff8a500df6616b2\u0026amp;signature=08556c5de05222924839f6f369eb3289fae29343737f07f3622d812ac3ea55f5\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/nace-ai/ON_ODtu5ozmA-6iq/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"NDI Platform API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#111111\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.ndi.nace.ai/guides/file-tools\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/file-tools.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.ndi.nace.ai/#organization\",\"name\":\"NDI Platform API\",\"url\":\"https://docs.ndi.nace.ai\"},{\"@type\":\"WebSite\",\"@id\":\"https://docs.ndi.nace.ai#website\",\"name\":\"NDI Platform API\",\"url\":\"https://docs.ndi.nace.ai\",\"publisher\":{\"@id\":\"https://docs.ndi.nace.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.ndi.nace.ai/guides/file-tools#webpage\",\"url\":\"https://docs.ndi.nace.ai/guides/file-tools\",\"name\":\"File tools\",\"description\":\"Find a file's exact path, see what is inside it, and ask questions about it\",\"dateModified\":\"2026-11-13T22:11:05.923Z\",\"isPartOf\":{\"@id\":\"https://docs.ndi.nace.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.ndi.nace.ai/guides/file-tools#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.ndi.nace.ai/guides/file-tools#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Guides\",\"item\":\"https://docs.ndi.nace.ai/guides/upload\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"File tools\",\"item\":\"https://docs.ndi.nace.ai/guides/file-tools\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.ndi.nace.ai/guides/file-tools#article\",\"headline\":\"File tools\",\"name\":\"File tools\",\"description\":\"Find a file's exact path, see what is inside it, and ask questions about it\",\"url\":\"https://docs.ndi.nace.ai/guides/file-tools\",\"mainEntityOfPage\":{\"@id\":\"https://docs.ndi.nace.ai/guides/file-tools#webpage\"},\"dateModified\":\"2026-11-13T22:11:05.923Z\",\"publisher\":{\"@id\":\"https://docs.ndi.nace.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.ndi.nace.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"NDI Platform API\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"NDI Platform API\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/guides/file-tools.md","siteName":"NDI Platform API","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Getting started","pages":[{"title":"Introduction","href":"/introduction"},{"title":"Quickstart","href":"/quickstart"},{"title":"Choose the right tool","href":"/guides/choose-a-tool"},{"title":"Authentication","href":"/authentication"}]},{"group":"Guides","pages":[{"title":"Upload a document","href":"/guides/upload"},{"title":"Parse a document","href":"/guides/parse"},{"title":"Parse response format","href":"/guides/parse-response"},{"title":"Extract structured data","href":"/guides/extract"},{"title":"Extract response format","href":"/guides/extract-response"},{"title":"Split a packet","href":"/guides/split"},{"title":"Classify a document","href":"/guides/classify"},{"title":"Ground quoted text","href":"/guides/ground"},{"title":"Ground response format","href":"/guides/ground-response"},{"title":"Create a workspace","href":"/guides/workspace"},{"title":"Connect customer storage","href":"/guides/customer-storage"},{"title":"Large and resumable uploads","href":"/guides/large-uploads"},{"title":"Browser upload grants","href":"/guides/upload-grants"},{"title":"Ingest and reconcile","href":"/guides/ingest-reconcile"},{"title":"Search a workspace","description":"Automatic search for one question, QA for a conversation — or test a ledger package","href":"/guides/search"},{"title":"File tools","href":"/guides/file-tools"},{"title":"Query tables","description":"Ask one question across spreadsheets","href":"/guides/query-tables"},{"title":"Ledger and report recipes","href":"/guides/ledger-recipes"},{"title":"Knowledge graph","href":"/guides/knowledge-graph"},{"title":"Access labels","href":"/guides/access-labels"},{"title":"Jobs and artifacts","href":"/guides/jobs"},{"title":"Extraction schema registry","href":"/guides/extraction-schemas"},{"title":"NDI CLI","href":"/guides/cli"},{"title":"MCP and CLI login","href":"/guides/mcp-cli"},{"title":"Update the SDKs, CLI, and MCP","href":"/guides/updating"},{"title":"Playground","href":"/guides/playground"}]},{"group":"Agents","pages":[{"title":"MCP","href":"/sdks/mcp"}]},{"group":"Concepts","pages":[{"title":"Granular vs workspace workflows","href":"/concepts/granular-vs-workspace"},{"title":"Workspaces","href":"/concepts/workspaces"},{"title":"Sources and uploads","href":"/concepts/sources-and-uploads"},{"title":"Jobs, idempotency, and async semantics","href":"/concepts/jobs-idempotency"},{"title":"Pagination","href":"/concepts/pagination"},{"title":"File lifecycle","href":"/concepts/file-lifecycle"},{"title":"Data retention","href":"/concepts/data-retention"},{"title":"Search methods","href":"/concepts/search-methods"},{"title":"Processing units","href":"/concepts/units"},{"title":"Access labels and coverage","href":"/concepts/access-labels"},{"title":"Errors and limits","href":"/concepts/errors"},{"title":"Format support","href":"/concepts/format-support"}]},{"group":"Troubleshooting","pages":[{"title":"Troubleshooting","href":"/troubleshooting/index"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/overview"}]},{"tab":"SDKs","versions":[{"version":"Python","groups":[{"group":"Get started","pages":[{"title":"Python SDK","href":"/sdks/python"}]},{"group":"Core methods","pages":[{"title":"Upload","href":"/sdks/python/upload"},{"title":"Parse","href":"/sdks/python/parse"},{"title":"Extract","href":"/sdks/python/extract"},{"title":"Split","href":"/sdks/python/split"},{"title":"Classify","href":"/sdks/python/classify"},{"title":"Ground","href":"/sdks/python/ground"},{"title":"Workspaces","href":"/sdks/python/workspaces"},{"title":"Storage connections","href":"/sdks/python/storage-connections"},{"title":"Deep search (deprecated)","href":"/sdks/python/search"},{"title":"Journal-entry testing","href":"/sdks/python/je-testing"},{"title":"Ledger understanding","href":"/sdks/python/ledger-understanding"},{"title":"Automatic search","href":"/sdks/python/automatic-search"},{"title":"QA","href":"/sdks/python/qa"},{"title":"Drex (Decision Model)","href":"/sdks/python/systemone"}]},{"group":"Async and utilities","pages":[{"title":"Async client","href":"/sdks/python/async"},{"title":"Job management","href":"/sdks/python/job-management"},{"title":"Error handling","href":"/sdks/python/error-handling"}]}]},{"version":"TypeScript","pages":[{"title":"TypeScript","href":"/sdks/typescript"}]}]}]},"basePath":"","title":"File tools - NDI Platform API","deploymentId":"dpl_HZVV42MMRSo9WnNHfTGZvby5jph9","buildId":"dpl_HZVV42MMRSo9WnNHfTGZvby5jph9","dynamics":[],"chunks":[]}