Workspaces
Read a file
Other errors (500, 502, 503, 504) are on Errors.
Other errors (500, 502, 503, 504) are on Errors.
Authorization
bearerAuth Your API key, sent as Authorization: Bearer nace_sk_...
- Where: the dashboard's API Keys page. It is shown once, when you create it.
- Format:
nace_sk_followed by 43 URL-safe characters (A-Z,a-z,0-9,_and-). - Limit: an account can hold at most 3 active keys.
- Wrong or missing key: returns
401 authentication_error.
In: header
Path Parameters
The workspace's workspace_id.
Header Parameters
Up to 200 characters, unique per account. A call that timed out keeps running: send it again with the same key and body to get its answer instead of running it twice.
length <= 200Request Body
application/json
The file's path in the workspace, as it was uploaded.
1 <= lengthPages to read, 1-based; leave it out for every page. Spreadsheets have no pages: name a tab with component.
Show variants
One tab or section to read; leave it out for the whole file.
Show variants
The most characters to return; past it, truncated is true.
1 <= value <= 1000000200000The first line to return, 1-based, counted in the text this read returns without a line span. Leave it out for line 1.
1 <= valueShow variants
The last line to return, inclusive. Leave it out for the last line.
1 <= valueShow variants
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/workspaces/string/tools/read-file" \ -H "Content-Type: application/json" \ -d '{ "path": "reports/2024/annual-report.pdf", "pages": [ 41, 42 ] }'{ "path": "string", "file_id": "string", "content": "string", "pages_returned": [ 0 ], "truncated": true, "components_returned": [ "string" ], "components_omitted": [ "string" ], "sql_tables": [ "string" ], "line_start": 0, "line_end": 0, "line_count": 0, "table": { "first_line": 0, "last_line": 0, "title": "string", "header": "string", "rows": 0 }, "job_id": "string"}