curl --request POST \
--url https://ndi-api.nace.ai/v1/workspaces/{workspace_id}/tools/read-file \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"path": "<string>"
}
'{
"components_omitted": [
"<string>"
],
"components_returned": [
"<string>"
],
"content": "<string>",
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pages_returned": [
123
],
"path": "<string>",
"truncated": true
}{
"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
}
}read_file
Read the text of one uploaded file.
Cost class: fast.
path names an uploaded source file — the only namespace this tool
serves. A workspace-internal path is refused with invalid_request
naming the uploaded file to use instead.
A file with several components (a spreadsheet’s tabs, a pdf’s sections)
answers with their text concatenated in the file’s own order, each part
under a one-line header naming the component; components_returned and
components_omitted report exactly what made it into the budget. Scope
the read with component=<name> (the names file_metadata lists)
when only one tab or section matters, and with pages (1-based) for
paged documents — spreadsheets have no pages, so scope those by component
instead. Images are refused — ask about them with qa_file.
curl --request POST \
--url https://ndi-api.nace.ai/v1/workspaces/{workspace_id}/tools/read-file \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"path": "<string>"
}
'{
"components_omitted": [
"<string>"
],
"components_returned": [
"<string>"
],
"content": "<string>",
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pages_returned": [
123
],
"path": "<string>",
"truncated": true
}{
"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
Request body for read-file.
path names an uploaded source file — the only namespace this tool
serves. A workspace-internal derivative path is refused with
invalid_request naming the uploaded file that owns it.
component scopes the read to one public component by name — a
spreadsheet tab or a pdf section, as listed by file-metadata.
pages is 1-based and selects on the file's absolute page numbers;
out-of-range pages are ignored (absent from pages_returned). Selected
pages come back de-duplicated in document order, whatever order they were
asked in. Spreadsheets have no pages — scope those with component
instead.
Response
Successful Response
Response body for read-file.
A file with several components (a spreadsheet's tabs, a pdf's sections)
answers with their text concatenated in the file's own order, each part
prefixed by a one-line header naming the component. components_returned
lists what contributed to content; components_omitted lists
components that were cut for size — the character budget ran out, or a
part was too large to serve — or that have no text rendering at all (a
query-only tab; ask it with qa-file) — so an absent component is
always visible, never a silently missing tab. Unnamed components (a
recording, a raw upload) are listed by kind.