Skip to main content
POST
read_file

Authorizations

X-API-Key
string
header
required

Path Parameters

workspace_id
string<uuid>
required

Workspace identifier.

Body

application/json

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.

path
string
required
component
string | null
max_chars
integer
default:200000
Required range: 1 <= x <= 1000000
pages
integer[] | null

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.

components_omitted
string[]
required
components_returned
string[]
required
content
string
required
file_id
string<uuid>
required
pages_returned
integer[]
required
path
string
required
truncated
boolean
required