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

Get File

Fetch a file by its ID to obtain additional details and the raw file content.
1curl --request GET \
2 --url https://api-prod.extend.app/files/:id \
3 --header 'Authorization: Bearer <token>'
Example File
1{
2 "object": "file",
3 "id": "file_1234",
4 "name": "example_file",
5 "type": "PDF",
6 "presignedUrl": "https://s3.example.com/file_1234.pdf",
7 "parentFileId": "file_5678", // Optional, only set if this file is a derivative of another file
8 "contents": {
9 "rawText": "This is the raw text content of the file...",
10 "pages": [
11 {
12 "pageNumber": 1,
13 "markdown": "This is the markdown content of the page...",
14 }
15 ]
16 },
17 "metadata": {
18 "parentSplit": { // Optional, only set if this file is a derivative of another file
19 "id": "324kjlfsd",
20 "type": "addendum",
21 "identifier": "addendum_1",
22 "startPage": 7,
23 "endPage": 9
24 }
25 }
26 "createdAt": "2024-01-01T00:00:00Z",
27 "updatedAt": "2024-01-01T00:00:00Z"
28}
Was this page helpful?
Previous

List Files

List files in your account.
Next
Built with

Path

id
string

The ID of the File to fetch. This is the ID returned when creating a new File or the value on fileId of a WorkflowRun object.

Query Parameters

You can add additional parameters to the request to modify the file contents returned. Currently only rawText is supported.

markdown
booleanDefaults to false

If set to true, the markdown content of the file will be included in the response. This is useful for indexing very clean content into RAG pipelines for files like PDFs, Word Documents, etc.

*Only available for files with a type of PDF, IMG.

*or .doc/.docx files that were auto-converted to PDFs.

rawText
booleanDefaults to false

If set to true, the raw text content of the file will be included in the response. This is useful for indexing text-based files like PDFs, Word Documents, etc.

html
booleanDefaults to false

If set to true, the html content of the file will be included in the response. This is useful for indexing html content into RAG pipelines for files like PDFs, Word Documents, etc.

*Only available for files with a type of DOCX.

Response

success
boolean

A true or false value for whether the file was fetched successfully or not.

file
File

A File object representing the fetched file. See the File object for more details.