For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Book a demoLog in
GuidesAPI ReferenceChangelogModel Versioning
GuidesAPI ReferenceChangelogModel Versioning
    • Getting Started
    • Authentication
    • API Versioning
    • SDKs
    • Deployments
  • Processor Endpoints
    • POSTRun Processor
    • GETGet Processor Run
    • GETList Processor Runs
    • POSTCancel Processor Run
    • DELDelete Processor Run
    • GETGet Batch Processor Run
    • GETList Processors
    • POSTCreate Processor
    • POSTUpdate Processor
    • POSTPublish Processor Version
    • GETGet Processor Version
    • GETList Processor Versions
  • Parse Endpoints
    • POSTParse File
    • POSTParse File Async
    • GETGet Parser Run
    • DELDelete Parser Run
  • Workflow Endpoints
    • POSTRun Workflow
    • GETGet Workflow Run
    • GETList Workflow Runs
    • POSTUpdate Workflow Run
    • POSTCancel Workflow Run
    • DELDelete Workflow Run
    • POSTCreate Workflow
    • POSTBatch Run Workflow
    • POSTCorrect Workflow Run Outputs
  • File Endpoints
    • POSTUpload File
    • GETGet File
    • DELDelete File
    • GETList Files
    • POSTCreate File
  • Edit Endpoints
    • POSTEdit File
    • POSTEdit File Async
    • POSTGenerate Edit Schema
    • GETGet Edit Run
    • DELDelete Edit Run
    • GETGet Edit Template
  • Evaluation Set Endpoints
    • GETGet Evaluation Set
    • GETList Evaluation Sets
    • POSTCreate Evaluation Set
    • GETList Evaluation Set Items
    • POSTCreate Evaluation Set Item
    • POSTUpdate Evaluation Set Item
    • DELDelete Evaluation Set Item
    • POSTBulk Create Evaluation Set Items
LogoLogo
Book a demoLog in
File Endpoints

List Files

GET
https://api.extend.ai/files
GET
/files
1from extend_ai import Extend
2
3client = Extend(
4 token="YOUR_TOKEN_HERE",
5 extend_api_version="2025-04-21",
6)
7
8client.files.list()
1{
2 "success": true,
3 "files": [
4 {
5 "object": "file",
6 "id": "file_xK9mLPqRtN3vS8wF5hB2cQ",
7 "name": "Invoices.pdf",
8 "metadata": {
9 "pageCount": 30,
10 "parentSplit": {
11 "id": "string",
12 "type": "Invoice",
13 "identifier": "other_2_9",
14 "startPage": 1,
15 "endPage": 10
16 }
17 },
18 "createdAt": "2024-03-21T15:30:00Z",
19 "updatedAt": "2024-03-21T16:45:00Z",
20 "type": "PDF",
21 "presignedUrl": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
22 "parentFileId": "file_Zk9mNP12Qw4yTv8BdR3H",
23 "contents": {
24 "rawText": "string",
25 "markdown": "string",
26 "pages": [
27 {
28 "pageNumber": 1,
29 "pageHeight": 10,
30 "pageWidth": 10,
31 "rawText": "This is the raw text of the page.",
32 "markdown": "# Heading\n\nThis is a paragraph with **bold** and *italic* text.\n\n- List item 1\n- List item 2\n\n> This is a blockquote",
33 "html": "<div>This is the html of the page.</div>"
34 }
35 ],
36 "sheets": [
37 {
38 "sheetName": "Sheet1",
39 "rawText": "This is the raw text of the sheet."
40 }
41 ]
42 },
43 "usage": {
44 "credits": 10
45 }
46 }
47 ],
48 "nextPageToken": "xK9mLPqRtN3vS8wF5hB2cQ==:zWvUxYjM4nKpL7aDgE9HbTcR2mAyX3/Q+CNkfBSw1dZ="
49}

List files in your account. Files represent documents that have been uploaded to Extend. This endpoint returns a paginated response. You can use the nextPageToken to fetch subsequent results.

Was this page helpful?
Previous

Create File

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Headers

x-extend-api-version"2025-04-21"OptionalDefaults to 2025-04-21
API version to use for the request. If you do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2025-04-21/developers/api-versioning) for more details.
x-extend-workspace-idstringOptional
The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2025-04-21/developers/authentication) for details on API key scopes.

Query parameters

nameContainsstringOptional

Filters files to only include those that contain the given string in the name.

Example: "invoice"

sortDirenumOptionalDefaults to desc
Sorts the files in ascending or descending order. Ascending order means the earliest file is returned first.
Allowed values:
nextPageTokenstringOptional
The token used to fetch the page of results from a previous request. We use cursor based pagination and will return a `nextPageToken` in the response if there are more results. Note that if other parameters are changed in subsequent requests, you may receive inconsistent data. example: `"xK9mLPqRtN3vS8wF5hB2cQ==:zWvUxYjM4nKpL7aDgE9HbTcR2mAyX3/Q+CNkfBSw1dZ="`
maxPageSizeintegerOptional1-1000Defaults to 10
The maximum number of results to return in the response. You may receive less than this number if there are fewer results than the maximum.

Response

Successfully retrieved files
successboolean
fileslist of objects
nextPageTokenstring

The token used to fetch the page of results from a previous request. We use cursor based pagination and will return a nextPageToken in the response if there are more results.

Note that if other parameters are changed in subsequent requests, you may receive inconsistent data.

example: "xK9mLPqRtN3vS8wF5hB2cQ==:zWvUxYjM4nKpL7aDgE9HbTcR2mAyX3/Q+CNkfBSw1dZ="

Errors

400
Bad Request Error
401
Unauthorized Error

API version to use for the request. If you do not specify a version, you will either receive a 400 Bad Request or be set to a previous legacy version. See API Versioning for more details.

The workspace ID to target. Required when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See Authentication for details on API key scopes.

The token used to fetch the page of results from a previous request. We use cursor based pagination and will return a nextPageToken in the response if there are more results.

Note that if other parameters are changed in subsequent requests, you may receive inconsistent data.

example: "xK9mLPqRtN3vS8wF5hB2cQ==:zWvUxYjM4nKpL7aDgE9HbTcR2mAyX3/Q+CNkfBSw1dZ="