curl --request POST \
--url https://ndi-api.nace.ai/v1/workspaces/{workspace_id}/tools/query-tables \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"paths": [
{
"path": "<string>",
"component": "<string>"
}
],
"query": "<string>"
}
'{
"answer": "<string>",
"citations": [],
"confidence": "certain",
"error": "<string>",
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"result_citations": [],
"result_materialization_error": "<string>",
"tables": [],
"timed_out": false,
"unavailable": []
}{
"error": {
"code": "invalid_request",
"detail": null,
"message": "Request body has extra fields that this operation does not accept.",
"request_id": "req-01j9k2n3p4q5r6s7t8v9",
"retryable": false
}
}{
"error": {
"code": "invalid_request",
"detail": null,
"message": "Request body has extra fields that this operation does not accept.",
"request_id": "req-01j9k2n3p4q5r6s7t8v9",
"retryable": false
}
}query_tables
Answer a natural-language question over uploaded table files — one or several.
Cost class: slow.
paths is a list of selection rows — {"path": ...} for a whole file,
{"path": ..., "component": <tab>} for one tab of one workbook (repeat
the path to select several tabs). Every path must be a table file —
a spreadsheet (xlsx, xls, xlsm, xlsb, ods) or record file (csv, tsv,
parquet, jsonl, ndjson, json); a document, media, or image path is
refused with invalid_request naming qa-file. Every tab is askable whatever its ingestion produced:
selections whose tabs all have extracted rows are answered by the SQL
engine — the answer keeps full result parquet storage outside the response
and returns bounded previews plus authenticated workspace result-file
citations — while a selection holding tabs with only a rendered sheet is
answered by a QA agent that reads renderings and queries row extractions
together (no result previews on that lane; citations quote the sheets).
component names are workbook-local — the same strings file-metadata
and filtered-search publish as component, matched exact-name first,
then the unambiguous sanitized alias. A name that matches nothing on its
own workbook — or any component on a single-table upload
(csv/jsonl/parquet), which has no named parts — is invalid_request. A
selected tab with no usable content at all is reported in unavailable
rather than silently dropped.
curl --request POST \
--url https://ndi-api.nace.ai/v1/workspaces/{workspace_id}/tools/query-tables \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"paths": [
{
"path": "<string>",
"component": "<string>"
}
],
"query": "<string>"
}
'{
"answer": "<string>",
"citations": [],
"confidence": "certain",
"error": "<string>",
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"result_citations": [],
"result_materialization_error": "<string>",
"tables": [],
"timed_out": false,
"unavailable": []
}{
"error": {
"code": "invalid_request",
"detail": null,
"message": "Request body has extra fields that this operation does not accept.",
"request_id": "req-01j9k2n3p4q5r6s7t8v9",
"retryable": false
}
}{
"error": {
"code": "invalid_request",
"detail": null,
"message": "Request body has extra fields that this operation does not accept.",
"request_id": "req-01j9k2n3p4q5r6s7t8v9",
"retryable": false
}
}Authorizations
Path Parameters
Workspace identifier.
Body
Question over a bounded set of workspace-uploaded table selections.
Every row's path must name a table file — a spreadsheet (xlsx,
xls, xlsm, xlsb, ods) or record file (csv, tsv, parquet, jsonl, ndjson,
json); a document, media, or image path is refused with
invalid_request naming qa-file. Every tab is
askable whatever its ingestion produced — extracted rows, a rendered
sheet, or both.
Response
Successful Response
Answer, provenance, unavailable inputs, and retained result previews.
Two lanes fill this shape. An all-queryable selection runs the SQL engine
and returns everything: tables previews, result_citations, and SQL
receipts in citations. A selection holding tabs without extracted rows
runs a QA agent over the files' rendered sheets and row extractions
together — the answer and quoted citations are filled, while
tables and result_citations stay empty (no SQL results exist to
retain). unavailable reports selections with no usable content on
either lane.
job_id is the durable job row created for this run; retrieve it via
GET /v1/jobs/{job_id} to inspect or replay the stored answer.
Show child attributes
Show child attributes
The engine's self-graded confidence in the answer — how well the queried tables support it, on the shared six-level scale (certain / very_high / high / medium / low / speculative). Null when the engine could not grade (a timeout's partial answer, a legacy run).
certain, very_high, high, medium, low, speculative Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes