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
ProductAPI ReferenceChangelogModel Versioning
ProductAPI ReferenceChangelogModel Versioning
    • Authentication
    • API Versioning
  • Workflow Endpoints
    • Run Workflow
    • Workflow Run
    • List Workflow Runs
    • Update Workflow Run
    • Create Workflow
    • Batch Run Workflow
    • Correct Workflow Run (Deprecated)
  • Processor Endpoints
    • Run Processor
    • Get Processor Run
    • Batch Processor Run
    • Create Processor
    • Update Processor
    • Publish Processor Version
    • Processor Version
    • List Processor Versions
  • Parse Endpoints
    • Parse File
  • File Endpoints
    • Upload File
    • Get File
    • List Files
    • Create File (Deprecated)
  • Evaluation Set Endpoints
    • Create Evaluation Set
    • Create Evaluation Set Item
    • Update Evaluation Set Item
    • Bulk Create Evaluation Set Item
  • Objects
    • Block
    • Evaluation Set
    • Evaluation Set Item
    • File
    • Processor
    • Processor Run
    • Batch Processor Run
    • Processor Version
    • Workflow
    • Workflow Run
    • Workflow Run Summary
  • Guides
    • Processor Configs
    • Output Types
    • Bounding Boxes
    • Supported File Types
    • Rate Limits
    • User Roles and Permissions
  • Webhooks
    • Configuration
    • Events
LogoLogo
Book a demoLog in
File Endpoints

List Files

List files in your account.
1curl --request GET \
2 --url https://api-prod.extend.app/files \
3 --header 'Authorization: Bearer <token>'
Example Success Response
1{
2 "success": true,
3 "nextPageToken": "abc123",
4 "files": [
5 {
6 "object": "file",
7 "id": "file_1234",
8 "name": "example_file",
9 "type": "PDF",
10 "presignedUrl": "https://s3.example.com/file_1234.pdf",
11 "metadata": {
12 "pageCount": 10
13 }
14 "createdAt": "2024-01-01T00:00:00Z",
15 "updatedAt": "2024-01-01T00:00:00Z"
16 }
17 ]
18}
Was this page helpful?
Previous

[DEPRECATED] Create File

Create a new file in Extend for use in an evaluation set.
Next
Built with

This endpoint allows you to fetch the files in your account.

This endpoint returns a paginated response. You can use the nextPageToken to fetch subsequent pages.

Query Parameters

nameContains
string

Filters files by the name of the file.

sortBy
stringDefaults to createdAt

Sorts the files by the given field.

Possible values include:

  • createdAt
sortDir
stringDefaults to desc

Sorts the files in ascending or descending order.

Possible values include:

  • asc: sort in ascending order
  • desc: sort in descending order
nextPageToken
string

The token used to fetch the page of results from a previous request.

Note: if parameters other than nextPageToken change in subsequent requests, you are likely to receive incomplete results.

maxPageSize
numberDefaults to 10

The maximum number of results to return per page.

You are not guaranteed to receive this many results per page, but you will not receive more than this.

  • Max: 1000
  • Min: 1

Response

success
boolean

A true or false value indicating whether the request was successful or not.

files
array

An array of File objects.

nextPageToken
string

The token used to fetch the next page of results.

If there are no more pages, the token will not be present.

The general pattern for collecting all results is to keep calling the endpoint with the nextPageToken and the same parameters, until the token is not present, for example:

files = []
token = None
while True:
response = list_files(nextPageToken=token)
files.extend(response.files)
token = response.nextPageToken
if not token:
break

Error Responses

success
boolean

Will be false if the request failed.

error
string

A description of the error that occurred.

Possible Errors

  • 404 Not Found: If the specified file does not exist.
  • 400 Bad Request: If invalid query parameters are provided.